View Single Post
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 07-11-2016 , 08:07   Re: Ultimate Fire in the Hole [Messages|Grenade Trail|Grenade Glow|Sounds]
Reply With Quote #14

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.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom