meTaLiCroSS |
08-10-2017 23:36 |
Re: [TUT] Replace Weapon Firing Sounds
Quote:
Originally Posted by Depresie
(Post 2540053)
the only way to fix it would be to recreate the weapon firing function, which would be a little CPU expensive..
|
Yeah, you might note you did a wrong research.
Whenever you post an snippet you should be fully sure of its functionality. Also, don't test on a listen server, test with on a dedicated one.
Weapons fire sound are handled client-side, this means there's no server code associated to the fire sound. The only association you can assume, is that clients listen to the shoot sound because it's sent to them by its respective PlayBack event (you can send a fire sound after this callback is triggered to override the sound played, you can see code reference on HLSDK, cl_dlls). The player who fires the weapon predicts the sound, and as you know, prediction is what it is: A PREDICTION, it's not synchronized with the server, and this sound could be easily skippable, depending on certain factors.
The only accurate snippet to change this fire sound correctly must be the weapon prediction override.
|