View Single Post
meTaLiCroSS
Gaze Upon My Hat
Join Date: Feb 2009
Location: Viņa del Mar, Chile
Old 08-25-2017 , 16:11   Re: [TUT] Replace Weapon Firing Sounds
Reply With Quote #37

Quote:
Originally Posted by CrazY. View Post
Why that statement exactly?



Hm, probably you're right, I'm too lazy to update the code now.



Ham_Weapon_SendWeaponAnim do the same thing of the stock Util_PlayWeaponAnim?
Because delay between server and client can be higher than 0.1, so client would not have a real reload sensation.

You should not keep reusing code you see on internet. That playback event trick is an useless snippet.

Yeah, both are the same, but you can hook one with extra addons. That's a good coding habit.

--

Clarifying:

Quote:
// PlaybackEvent (play custom sounds to all clients, don't only the owner)
playback_event(flags | FEV_HOSTONLY, invoker, eventid, delay, origin, angles, fparam1, fparam2, iParam1, iParam2, bParam1, bParam2);
return FMRES_SUPERCEDE;
Don't know who started with this **trick** (dias maybe?), but it's some kind of HIV virus. Original flag param has the FEV_NOTHOST flag, then you're setting FEV_HOSTONLY, so I guess he was high as f*ck. Then, everybody started copying their addons with this. Sad
__________________
Quote:
Originally Posted by joropito View Post
You're right Metalicross

Last edited by meTaLiCroSS; 08-25-2017 at 16:16.
meTaLiCroSS is offline