diff --git a/scripting/SoundManager.sp b/scripting/SoundManager.sp index 7fde742..2d4b1d0 100644 --- a/scripting/SoundManager.sp +++ b/scripting/SoundManager.sp @@ -10,7 +10,7 @@ public Plugin myinfo = name = "Sound Manager", author = "Haze", description = "", - version = "1.0.3", + version = "1.0.4", url = "" } @@ -159,6 +159,11 @@ public void OnClientCookiesCached(int client) { gB_ShouldHookShotgunShot = true; } + + if(gI_Settings[client] & Mute_Soundscapes) + { + ClientCommand(client, "cl_soundscape_flush"); // maybe auth can take a long time and a soundscape slips through... + } } public Action OnPlayerRunCmd(int client) @@ -308,10 +313,12 @@ struct ss_update_t //void CEnvSoundscape::UpdateForPlayer( ss_update_t &update ) public MRESReturn DHook_UpdateForPlayer(int pThis, Handle hParams) { +#if 0 if(gI_SilentSoundScape == -1) { return MRES_Ignored; } +#endif int client = DHookGetParamObjectPtrVar(hParams, 1, 0, ObjectValueType_CBaseEntityPtr); @@ -588,6 +595,13 @@ public int MenuHandler_Sounds(Menu menu, MenuAction action, int param1, int para { CheckShotgunShotHook(); } + else if(iOption == Mute_Soundscapes) + { + if(gI_Settings[param1] & Mute_Soundscapes) + { + ClientCommand(param1, "cl_soundscape_flush"); + } + } char sCookie[16]; IntToString(gI_Settings[param1], sCookie, 16);