halflife icon indicating copy to clipboard operation
halflife copied to clipboard

[BUG] Move while defusing

Open MPNumB opened this issue 13 years ago • 2 comments

If you have a weapon with sniper scope and you are within a defuse. Zooming or unzooming will reset your speed, allowing you to move.

I'd suggest to auto-unzoom when starting to defuse and block secondary attack while defusing for all the weapons.

MPNumB avatar Feb 17 '13 14:02 MPNumB

This happens because the secondary attack for weapons with scopes calls CBasePlayer::ResetMaxSpeed, which doesn't account for m_bIsDefusing. When m_bIsDefusing is true requests to reset speed should be ignored so max speed stays at 1.

Note that if you add a check for it there the boolean must be set to false before ResetMaxSpeed is called from CGrenade::C4Think or it won't properly update. You'll also need to make sure movement speed is reset properly if the player dies or respawns.

SamVanheer avatar May 04 '19 18:05 SamVanheer

This still happens, here's a video on how to reproduce: https://youtu.be/vKtk4A_5otk?t=116

Maxi605 avatar Oct 05 '19 21:10 Maxi605