Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Egon gun sometimes keeps playing run sound after stopping #1750

Open
SamVanheer opened this issue Sep 15, 2016 · 1 comment
Open

Egon gun sometimes keeps playing run sound after stopping #1750

SamVanheer opened this issue Sep 15, 2016 · 1 comment

Comments

@SamVanheer
Copy link

The Egon gun sometimes keeps playing the run sound after stopping.

This happens due to multiple run sounds being played at the same time; instead of having a sound that loops on its own, it is looped manually in code, which causes some overlap.

To fix this, see this change: https://github.com/SamVanheer/HLEnhanced/blob/19396936af13e417e7f9eaf48c48c49699da03fb/game/client/ev_hldm.cpp#L1378

@SamVanheer
Copy link
Author

SamVanheer commented Jan 31, 2021

This bug is caused by the same thing as #1621. A rounding error creeps in sometimes that causes the client to get an fuser1 value of 0 while the server has something like 0.00002. On the client side the event fires, on the server side it does once fuser1 becomes <= 0 at which point the client does it again because it's getting another fuser1 value <= 0.

Note that the timing issues also seem to cause the idle animation to not play when the weapon stops firing. There is currently a 2 second delay before weapon idle runs the idle animation part, but even with that fixed this rounding issue causes it to break sometimes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants