From f5f80570b223b54ec263fcc470b671e00bab4d20 Mon Sep 17 00:00:00 2001 From: Ross Bemrose Date: Fri, 6 Jun 2014 15:17:20 -0400 Subject: [PATCH] Quick fix to make the single-player sounds work when Read Game Sounds isn't loaded. --- addons/sourcemod/scripting/prophunt.sp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/addons/sourcemod/scripting/prophunt.sp b/addons/sourcemod/scripting/prophunt.sp index 4fd5371..65d9709 100644 --- a/addons/sourcemod/scripting/prophunt.sp +++ b/addons/sourcemod/scripting/prophunt.sp @@ -24,7 +24,7 @@ #define SNDCHAN_VOICE2 7 #endif -#define PL_VERSION "3.2.0" +#define PL_VERSION "3.2.1" //-------------------------------------------------------------------------------------------------------------------------------- //-------------------------------------------- MAIN PROPHUNT CONFIGURATION ------------------------------------------------------- //-------------------------------------------------------------------------------------------------------------------------------- @@ -2258,11 +2258,14 @@ PH_EmitSoundToClient(client, const String:soundid[], entity = SOUND_FROM_PLAYER, { decl String:sample[128]; + new bool:emitted = false; + if(GetTrieString(g_BroadcastSounds, soundid, sample, sizeof(sample))) { - EmitGameSoundToClient(client, sample, entity, flags, speakerentity, origin, dir, updatePos, soundtime); + emitted = EmitGameSoundToClient(client, sample, entity, flags, speakerentity, origin, dir, updatePos, soundtime); } - else if(GetTrieString(g_Sounds, soundid, sample, sizeof(sample))) + + if(!emitted && GetTrieString(g_Sounds, soundid, sample, sizeof(sample))) { if(!IsSoundPrecached(sample)) {