Closed malortie closed 1 year ago
This is caused by an edge case in the game's weapon prediction system.
The server simulates the frame first, runs the attack logic and decrements the ammo count. That ammo count is then sent to the client which simulates the same frame with the state the player is in at the end of the frame so the ammo count is already 0, so it doesn't run the attack logic and doesn't play the animation.
It should be simulating frames using the state from the start of the frame to work properly but that's not possible within the limits of the SDK.
There are other problems like this in the weapons code. With some ugly workarounds this can be fixed but it's fragile. I've fixed this issue by manually tracking this edge case and having the server play the animation instead.
Description
When the hornet gun was empty and regenerates one ammo, the fire animation does not play. This happens for primary and secondary attack modes.
Steps to reproduce
In both attack modes, the fire animation does not play.
Build : Half-Life Unified SDK V1.0.0 Release Candidate 001
Project info
Using
cl_projectinfo_print_all
: