diff options
-rw-r--r-- | src/game/bg_pmove.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/game/bg_pmove.c b/src/game/bg_pmove.c index 684e020a..5d51c34a 100644 --- a/src/game/bg_pmove.c +++ b/src/game/bg_pmove.c @@ -407,7 +407,10 @@ static float PM_CmdScale( usercmd_t *cmd ) else if( wasSprinting && !sprint ) pm->ps->stats[ STAT_STATE ] &= ~SS_SPEEDBOOST; - if( sprint ) + // Walk overrides sprint. We keep the state that we want to be sprinting + // (above), but don't apply the modifier, and in g_active we skip taking + // the stamina too. + if( sprint && !( cmd->buttons & BUTTON_WALKING ) ) modifier *= HUMAN_SPRINT_MODIFIER; else modifier *= HUMAN_JOG_MODIFIER; |