diff options
author | /dev/humancontroller <devhc@example.com> | 2014-07-14 16:12:28 +0200 |
---|---|---|
committer | /dev/humancontroller <devhc@example.com> | 2017-03-09 13:51:16 +0100 |
commit | 189239bc44323954c70fa9cd61d955fc3345673d (patch) | |
tree | 049f66e32be69b4098cc64d1bf564cd02cabe856 /src/game/bg_misc.c | |
parent | c081ab5cdc6b92d5c072c8a4d8fed4b3c005996e (diff) |
fix the formulas in BG_EvaluateTrajectoryDelta()
Diffstat (limited to 'src/game/bg_misc.c')
-rw-r--r-- | src/game/bg_misc.c | 4 |
1 files changed, 2 insertions, 2 deletions
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; |