Delay on Firing Sound? Which hook is best?
I have successfully replaced a weapons sounds with another. I have, essentially, made my kar98 sound like a springfield both to those around me and to myself.
The problem is, to myself, the sound is a bit delayed. Here's what I'm doing:
The latter 3 of the above list takes place inside FM_PlaybackEvent, where I also change the event to another weapon - but changing the event only applies to what others around me hear. If I didn't block firing in CD, I'd still hear the original sound of the kar98. When I actually click fire, everything happens perfectly. The problem is, it's a little delayed. When I shoot any other weapon, the sound/animation/recoil is instantaneous. With this weapon, it is delayed about half a second. Small, but definitely noticable. I'm wondering if FM_PlaybackEvent provides any delay from when you actually shoot? I have also tried doing this in FM_CmdStart and hooking when UC_Buttons contains IN_ATTACK, but the delay is the same (also with prethink hook). Again, my question is why there could possibly be a delay of the sound being played / animation being played, and if there is a better method of doing it so-as to avoid the delay? Code:
When I enter in the console, "spk weapons/spring_shoot.wav", it is instant, unlike this. Thanks for the help guys. |
Re: Delay on Firing Sound? Which hook is best?
I'm not generally one to bump, but I am 99% done adding an unscoped springfield to Day of Defeat, giving a huge balance to the allies/axis teams..
But when you shoot, there is a half-second delay before it actually plays the sound and gives the recoil. The answer is probably very simple but I can't quite grasp it - VEN, Ava, vet, any input on this? Just trying to play a sound/recoil/anim when the weapon gets fired, basically. |
Re: Delay on Firing Sound? Which hook is best?
Hey, only a year late. You've probably got the plugin done by now. I just started messing around with the playback_event stuff. That's how I found this thread.
I didn't notice any delay in the animation or sound when using it. It seemed pretty instantaneous. But I hard coded the parameters rather than pass the ones provided by the call. |
Re: Delay on Firing Sound? Which hook is best?
bumping ^^
what are recoil_kar and seq_fire params? i want re replace sounds of weapons in Counter Strike, but all of these are new events to me |
| All times are GMT -4. The time now is 16:17. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.