From 35191745cab53ade1f94f6988e4fc753a4606ee3 Mon Sep 17 00:00:00 2001 From: Kyle Sanderson Date: Thu, 24 Oct 2013 13:20:42 -0400 Subject: [PATCH] Fix regression in SDKTools SetClientListening hook refcounting (bug 5956, r=fyren). --- extensions/sdktools/voice.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/sdktools/voice.cpp b/extensions/sdktools/voice.cpp index 3c4ffd97..4ae2877e 100644 --- a/extensions/sdktools/voice.cpp +++ b/extensions/sdktools/voice.cpp @@ -68,7 +68,7 @@ SH_DECL_HOOK1_void(IServerGameClients, ClientCommand, SH_NOATTRIB, 0, edict_t *) bool DecHookCount() { - if (g_VoiceHookCount == 0) + if (--g_VoiceHookCount == 0) { SH_REMOVE_HOOK(IVoiceServer, SetClientListening, voiceserver, SH_MEMBER(&g_SdkTools, &SDKTools::OnSetClientListening), false); return true;