From d1b356440f198db43a7d05d466c632b3763f53c5 Mon Sep 17 00:00:00 2001 From: Conner Date: Wed, 22 Oct 2025 17:09:47 -0400 Subject: [PATCH] Should hopefully fix error `[mumble] MUMBLE_ADD_VOICE_CHANNEL_LISTE: Tried to call native on a channel that didn't exist` by removing race condition and adding check for channel before adding user(s) to channel. --- client/init/proximity.lua | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/client/init/proximity.lua b/client/init/proximity.lua index c4812cd..52b1029 100644 --- a/client/init/proximity.lua +++ b/client/init/proximity.lua @@ -35,8 +35,15 @@ function addNearbyPlayers() currentTargets = {} MumbleClearVoiceTargetChannels(voiceTarget) if LocalPlayer.state.disableProximity then return end - MumbleAddVoiceChannelListen(LocalPlayer.state.assignedChannel) - MumbleAddVoiceTargetChannel(voiceTarget, LocalPlayer.state.assignedChannel) + + local assignedChannel = LocalPlayer.state.assignedChannel + if assignedChannel and assignedChannel ~= 0 then + local channel = MumbleGetVoiceChannelFromServerId(playerServerId) + if channel ~= -1 and channel == assignedChannel then + MumbleAddVoiceChannelListen(assignedChannel) + MumbleAddVoiceTargetChannel(voiceTarget, assignedChannel) + end + end for source, _ in pairs(callData) do if source ~= playerServerId then