mirror of
https://github.com/Haze1337/Sound-Manager.git
synced 2025-12-06 18:08:34 +00:00
Send -1 soundscapeIndex's & cl_soundscape_flush (helps with kz_bhop_genkai) (#12)
This commit is contained in:
parent
2fb7a1d9d7
commit
58a1046e0a
@ -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);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user