mirror of
https://github.com/Haze1337/Sound-Manager.git
synced 2025-12-07 10:28:33 +00:00
Code Improvements
This commit is contained in:
parent
cd9efe3a4f
commit
8822d2efeb
Binary file not shown.
@ -14,9 +14,6 @@ public Plugin myinfo =
|
|||||||
url = ""
|
url = ""
|
||||||
}
|
}
|
||||||
|
|
||||||
//CSS: 138: port.LightHum2
|
|
||||||
//CSGO: 199: port.LightHum2
|
|
||||||
|
|
||||||
#define Mute_Soundscapes (1 << 0)
|
#define Mute_Soundscapes (1 << 0)
|
||||||
#define Mute_AmbientSounds (1 << 1)
|
#define Mute_AmbientSounds (1 << 1)
|
||||||
#define Mute_GunSounds (1 << 2)
|
#define Mute_GunSounds (1 << 2)
|
||||||
@ -43,6 +40,7 @@ Handle gH_GetPlayerSlot = null;
|
|||||||
|
|
||||||
// Other
|
// Other
|
||||||
int gI_SilentSoundScape = 0;
|
int gI_SilentSoundScape = 0;
|
||||||
|
int gI_AmbientOffset = 0;
|
||||||
bool gB_ShouldHookShotgunShot = false;
|
bool gB_ShouldHookShotgunShot = false;
|
||||||
ArrayList gA_PlayEverywhereAmbients = null;
|
ArrayList gA_PlayEverywhereAmbients = null;
|
||||||
bool gB_EntitiesFound = false;
|
bool gB_EntitiesFound = false;
|
||||||
@ -56,16 +54,20 @@ public APLRes AskPluginLoad2(Handle myself, bool late, char[] error, int err_max
|
|||||||
gB_LateLoad = late;
|
gB_LateLoad = late;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//CSS: 138: port.LightHum2
|
||||||
|
//CSGO: 199: port.LightHum2
|
||||||
public void OnPluginStart()
|
public void OnPluginStart()
|
||||||
{
|
{
|
||||||
gEV_Type = GetEngineVersion();
|
gEV_Type = GetEngineVersion();
|
||||||
if(gEV_Type == Engine_CSS)
|
if(gEV_Type == Engine_CSS)
|
||||||
{
|
{
|
||||||
gI_SilentSoundScape = 138;
|
gI_SilentSoundScape = 138;
|
||||||
|
gI_AmbientOffset = 85;
|
||||||
}
|
}
|
||||||
else if(gEV_Type == Engine_CSGO)
|
else if(gEV_Type == Engine_CSGO)
|
||||||
{
|
{
|
||||||
gI_SilentSoundScape = 199;
|
gI_SilentSoundScape = 199;
|
||||||
|
gI_AmbientOffset = 89;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -425,7 +427,7 @@ public MRESReturn DHook_SendSound(Address pThis, Handle hParams)
|
|||||||
return MRES_Ignored;
|
return MRES_Ignored;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool bIsAmbient = DHookGetParamObjectPtrVar(hParams, 1, gEV_Type == Engine_CSS ? 85 : 89, ObjectValueType_Bool);
|
bool bIsAmbient = DHookGetParamObjectPtrVar(hParams, 1, gI_AmbientOffset, ObjectValueType_Bool);
|
||||||
|
|
||||||
MRESReturn ret = MRES_Ignored;
|
MRESReturn ret = MRES_Ignored;
|
||||||
|
|
||||||
@ -525,7 +527,6 @@ public int MenuHandler_Sounds(Menu menu, MenuAction action, int param1, int para
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int iOption = StringToInt(sInfo);
|
int iOption = StringToInt(sInfo);
|
||||||
gI_Settings[param1] ^= iOption;
|
gI_Settings[param1] ^= iOption;
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user