summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/cgame/cg_event.c7
-rw-r--r--src/cgame/cg_local.h1
2 files changed, 5 insertions, 3 deletions
diff --git a/src/cgame/cg_event.c b/src/cgame/cg_event.c
index 65873f7f..ca13b0ab 100644
--- a/src/cgame/cg_event.c
+++ b/src/cgame/cg_event.c
@@ -613,6 +613,8 @@ void CG_EntityEvent( centity_t *cent, vec3_t position )
float oldStep;
int delta;
int step;
+ float steptime;
+ playerState_t *ps = &cg.predictedPlayerState;
if( clientNum != cg.predictedPlayerState.clientNum )
break;
@@ -624,9 +626,10 @@ void CG_EntityEvent( centity_t *cent, vec3_t position )
// check for stepping up before a previous step is completed
delta = cg.time - cg.stepTime;
+ steptime = BG_FindSteptimeForClass( ps->stats[ STAT_PCLASS ] );
- if( delta < STEP_TIME )
- oldStep = cg.stepChange * ( STEP_TIME - delta ) / STEP_TIME;
+ if( delta < steptime )
+ oldStep = cg.stepChange * ( steptime - delta ) / steptime;
else
oldStep = 0;
diff --git a/src/cgame/cg_local.h b/src/cgame/cg_local.h
index 25763f37..3f52acf1 100644
--- a/src/cgame/cg_local.h
+++ b/src/cgame/cg_local.h
@@ -37,7 +37,6 @@
#define DAMAGE_TIME 500
#define LAND_DEFLECT_TIME 150
#define LAND_RETURN_TIME 300
-#define STEP_TIME 200
#define DUCK_TIME 100
#define PAIN_TWITCH_TIME 200
#define WEAPON_SELECT_TIME 1400