From 189239bc44323954c70fa9cd61d955fc3345673d Mon Sep 17 00:00:00 2001 From: /dev/humancontroller Date: Mon, 14 Jul 2014 16:12:28 +0200 Subject: fix the formulas in BG_EvaluateTrajectoryDelta() --- src/game/bg_misc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/game') diff --git a/src/game/bg_misc.c b/src/game/bg_misc.c index deabc983..6a1a7e77 100644 --- a/src/game/bg_misc.c +++ b/src/game/bg_misc.c @@ -2676,12 +2676,12 @@ void BG_EvaluateTrajectoryDelta( const trajectory_t *tr, int atTime, vec3_t resu case TR_SINE: deltaTime = ( atTime - tr->trTime ) / (float)tr->trDuration; phase = cos( deltaTime * M_PI * 2 ); // derivative of sin = cos - phase *= 0.5; + phase *= 2 * M_PI * 1000 / (float)tr->trDuration; VectorScale( tr->trDelta, phase, result ); break; case TR_LINEAR_STOP: - if( atTime > tr->trTime + tr->trDuration ) + if( atTime > tr->trTime + tr->trDuration || atTime < tr->trTime ) { VectorClear( result ); return; -- cgit