Fix fast draining suit

► Fixed an issue where spamming the sprint button would drain the aux power rapidly.
This commit is contained in:
speedvoltage 2025-03-12 17:00:17 +01:00
parent a62efecf62
commit 057fc5ce4a

View file

@ -576,9 +576,10 @@ void CHL2_Player::HandleSpeedChanges( CMoveData *mv )
void CHL2_Player::ReduceTimers( CMoveData *mv )
{
bool bPlayerNotMoving = mv->m_vecVelocity.Length() < 0.1f;
bool bSprinting = mv->m_flClientMaxSpeed == HL2_SPRINT_SPEED;
if ( bSprinting )
if ( bSprinting && !bPlayerNotMoving )
{
SuitPower_AddDevice( SuitDeviceSprint );
}