summaryrefslogtreecommitdiff
path: root/src/game/g_active.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/g_active.c')
-rw-r--r--src/game/g_active.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/game/g_active.c b/src/game/g_active.c
index 236bc708..4bd1c30e 100644
--- a/src/game/g_active.c
+++ b/src/game/g_active.c
@@ -596,8 +596,9 @@ void ClientTimerActions( gentity_t *ent, int msec )
// Restore or subtract stamina
if( stopped || client->ps.pm_type == PM_JETPACK )
client->ps.stats[ STAT_STAMINA ] += STAMINA_STOP_RESTORE;
- else if( client->ps.stats[ STAT_STATE ] & SS_SPEEDBOOST )
- client->ps.stats[ STAT_STAMINA ] -= STAMINA_SPRINT_TAKE;
+ else if( ( client->ps.stats[ STAT_STATE ] & SS_SPEEDBOOST ) &&
+ !( client->buttons & BUTTON_WALKING ) ) // walk overrides sprint
+ client->ps.stats[ STAT_STAMINA ] -= STAMINA_SPRINT_TAKE;
else if( walking || crouched )
client->ps.stats[ STAT_STAMINA ] += STAMINA_WALK_RESTORE;