diff options
author | Tim Angus <tim@ngus.net> | 2002-10-03 21:20:35 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2002-10-03 21:20:35 +0000 |
commit | 56d3022eff41ec9e55740f53955ab172e3b78110 (patch) | |
tree | 2c97aa0e914776ffd3a99a5f6d83194de8c64e5b /src | |
parent | 8b99984ae036ca5573c5e5830273cf31378fe9b7 (diff) |
* Fixed step time bug
Diffstat (limited to 'src')
-rw-r--r-- | src/cgame/cg_event.c | 7 | ||||
-rw-r--r-- | src/cgame/cg_local.h | 1 |
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 |