Quote:
if(!is_blank(szSound)) is pointless, forward is called only for grenades so code reach a case for sure and string can't be empty.
|
It actually can be empty if you enable the sounds from the .ini file and leave a line empty for a certain grenade, which will block the "fire in the hole" sound for that grenade.
Quote:
In fwdPrecacheSound check if you should replace the sound before blocking the original one.
|
There's a check for that when registering the forward in
plugin_init, so it won't be called unless the sound should be blocked.
PHP Code:
if(g_eSettings[stgSoundEnable] && ((!g_blSoundHe && !g_blSoundFlash && !g_blSoundSmoke) || !g_eSettings[stgSoundPlayType]))
register_forward(FM_PrecacheSound, "fwdPrecacheSound")
Everything else is fixed.
__________________