Skip to content
This repository has been archived by the owner on Jan 12, 2022. It is now read-only.

Commit

Permalink
Quick fix to make the single-player sounds work when Read Game Sounds…
Browse files Browse the repository at this point in the history
… isn't loaded.
  • Loading branch information
powerlord committed Jun 6, 2014
1 parent eb0036a commit f5f8057
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions addons/sourcemod/scripting/prophunt.sp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#define SNDCHAN_VOICE2 7
#endif

#define PL_VERSION "3.2.0"
#define PL_VERSION "3.2.1"
//--------------------------------------------------------------------------------------------------------------------------------
//-------------------------------------------- MAIN PROPHUNT CONFIGURATION -------------------------------------------------------
//--------------------------------------------------------------------------------------------------------------------------------
Expand Down Expand Up @@ -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))
{
Expand Down

1 comment on commit f5f8057

@powerlord
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Somehow I was in 3.2.0 branch when I did this instead of in master... 😦

Please sign in to comment.