summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/game/bg_pmove.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/game/bg_pmove.c b/src/game/bg_pmove.c
index 9a3cfe97..184d13a1 100644
--- a/src/game/bg_pmove.c
+++ b/src/game/bg_pmove.c
@@ -380,13 +380,19 @@ static float PM_CmdScale( usercmd_t *cmd )
float total;
float scale;
float modifier = 1.0f;
-
+
if( pm->ps->stats[ STAT_TEAM ] == TEAM_HUMANS && pm->ps->pm_type == PM_NORMAL )
{
- if( cmd->buttons & BUTTON_SPRINT )
+ if( pm->ps->stats[ STAT_STAMINA ] > 0 && cmd->buttons & BUTTON_SPRINT )
+ {
modifier *= HUMAN_SPRINT_MODIFIER;
+ pm->ps->stats[ STAT_STATE ] |= SS_SPEEDBOOST;
+ }
else
+ {
modifier *= HUMAN_JOG_MODIFIER;
+ pm->ps->stats[ STAT_STATE ] &= ~SS_SPEEDBOOST;
+ }
if( cmd->forwardmove < 0 )
{