Sprint even if in the air after unducking

► Fixed an issue where sprint would sometimes not start while unducking in the air.
This commit is contained in:
speedvoltage 2025-03-06 12:33:02 +01:00
parent ecf72a8cb9
commit e59481922e
2 changed files with 7 additions and 0 deletions

View file

@ -804,6 +804,9 @@ void C_HL2MP_Player::HandleSpeedChanges( CMoveData *mv )
bSprinting = false;
// Putting those here instead of within bWantsToChangeSprinting to ensure sprint properly starts when summoned!
if ( GetGroundEntity() == NULL && ( mv->m_nButtons & IN_SPEED ) )
bSprinting = true;
if ( m_Local.m_bDucked && !m_Local.m_bDucking && bSprinting )
bSprinting = false;

View file

@ -515,6 +515,10 @@ void CHL2_Player::HandleSpeedChanges( CMoveData *mv )
// Putting those here instead of within bWantsToChangeSprinting to ensure sprint properly starts when summoned!
// Restoring pre-OB (2010) working sprinting behavior.
if ( GetGroundEntity() == NULL && ( mv->m_nButtons & IN_SPEED ) )
bSprinting = true;
if ( m_Local.m_bDucked && !m_Local.m_bDucking && bSprinting )
bSprinting = false;