mirror of
https://github.com/ValveSoftware/source-sdk-2013.git
synced 2025-04-08 11:01:33 +00:00
Fix fast draining suit
► Fixed an issue where spamming the sprint button would drain the aux power rapidly.
This commit is contained in:
parent
a62efecf62
commit
057fc5ce4a
1 changed files with 2 additions and 1 deletions
|
@ -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 );
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue