diff options
-rw-r--r-- | src/game/g_buildable.c | 6 | ||||
-rw-r--r-- | src/game/g_local.h | 2 | ||||
-rw-r--r-- | src/game/g_main.c | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/src/game/g_buildable.c b/src/game/g_buildable.c index c4db0d34..cc94bbce 100644 --- a/src/game/g_buildable.c +++ b/src/game/g_buildable.c @@ -366,7 +366,7 @@ qboolean hdef1_trackenemy( gentity_t *self ) float distanceToTarget = HDEF1_RANGE; float timeTilImpact; vec3_t halfAcceleration; - vec3_t thirdJounce; + vec3_t thirdJerk; int i; VectorSubtract( self->enemy->s.pos.trBase, self->s.pos.trBase, dirToTarget ); @@ -379,8 +379,8 @@ qboolean hdef1_trackenemy( gentity_t *self ) VectorSubtract( dirToTarget, self->s.pos.trBase, dirToTarget ); #endif - VectorScale( self->enemy->acceleration, 0.5f, halfAcceleration ); - VectorScale( self->enemy->jounce, 0.33333f, thirdJounce ); + VectorScale( self->enemy->acceleration, 1.0f / 2.0f, halfAcceleration ); + VectorScale( self->enemy->jerk, 1.0f / 3.0f, thirdJerk ); //O( time ) - worst case O( time ) = 250 iterations for( i = 0; ( i * HDEF1_PROJSPEED ) / 1000.0f < distanceToTarget; i++ ) diff --git a/src/game/g_local.h b/src/game/g_local.h index 0e971899..b07099b2 100644 --- a/src/game/g_local.h +++ b/src/game/g_local.h @@ -137,7 +137,7 @@ struct gentity_s { vec3_t oldVelocity; vec3_t acceleration; vec3_t oldAccel; - vec3_t jounce; + vec3_t jerk; int nextthink; void (*think)(gentity_t *self); diff --git a/src/game/g_main.c b/src/game/g_main.c index 9fb51eb1..d340e3c7 100644 --- a/src/game/g_main.c +++ b/src/game/g_main.c @@ -1816,7 +1816,7 @@ void G_EvaluateAcceleration( gentity_t *ent, int msec ) VectorScale( deltaVelocity, 1.0f / (float)msec, ent->acceleration ); VectorSubtract( ent->acceleration, ent->oldAccel, deltaAccel ); - VectorScale( deltaAccel, 1.0f / (float)msec, ent->jounce ); + VectorScale( deltaAccel, 1.0f / (float)msec, ent->jerk ); VectorCopy( ent->s.pos.trDelta, ent->oldVelocity ); VectorCopy( ent->acceleration, ent->oldAccel ); |