Open SamVanheer opened 3 years ago
This is happening because of issue https://github.com/ValveSoftware/halflife/issues/3071. m_fFireOnEmpty
would be true if iMaxClip()
could return the correct value in client side weapons code.
https://github.com/ValveSoftware/halflife/blob/c7240b965743a53a29491dd49320c88eecf6257b/cl_dll/hl/hl_weapons.cpp#L352-L360
If weapon prediction is enabled and if you fire the 357 until it's empty and continue to hold down the primary attack key, the reload animation is started every frame until you let go of the attack key.
This happens because of this code: https://github.com/ValveSoftware/halflife/blob/c7240b965743a53a29491dd49320c88eecf6257b/dlls/python.cpp#L170-L176
If
m_fFireOnEmpty
is false it immediately tries to reload. This code executes every frame on the client which causes the glitchy animation.It should instead do what the Glock does: https://github.com/ValveSoftware/halflife/blob/c7240b965743a53a29491dd49320c88eecf6257b/dlls/wpn_shared/hl_wpn_glock.cpp#L110-L114
The call to
Reload
needs to be removed. The weapon will reload automatically as soon as the player lets go of the attack key.This bug was originally reported as part of #617 but was overlooked.