diff options
author | Christopher Schwarz <lakitu7@gmail.com> | 2009-10-24 18:30:51 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2013-01-03 00:17:03 +0000 |
commit | 7326d47bb4400ab12aa09c22a820d1191cea0ffc (patch) | |
tree | a18cf8280ab7b3d9cc1ef51563d9ab87ca413a49 | |
parent | 21415cf0275cc10272010e4f8787938f301808f2 (diff) |
* Fix holding sprint while walking from allowing you to walk slightly faster (thanks Roman Tetelman)
-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; |