diff options
author | Tim Angus <tim@ngus.net> | 2001-08-17 14:10:16 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2001-08-17 14:10:16 +0000 |
commit | 8a24d464b558d46d9d8067f93bfae834c5f0d7d8 (patch) | |
tree | 3265c824b1993593b812866ad9a1daaf88edba46 /src/cgame/cg_animmapobj.c | |
parent | 19fb544e1df363411b176f7f45af79f52a6d90d2 (diff) |
Fix for lerp issues
Diffstat (limited to 'src/cgame/cg_animmapobj.c')
-rw-r--r-- | src/cgame/cg_animmapobj.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/src/cgame/cg_animmapobj.c b/src/cgame/cg_animmapobj.c index 7baba305..34287c68 100644 --- a/src/cgame/cg_animmapobj.c +++ b/src/cgame/cg_animmapobj.c @@ -117,13 +117,18 @@ CG_AMOAnimation static void CG_AMOAnimation( centity_t *cent, int *old, int *now, float *backLerp ) { if( !( cent->currentState.eFlags & EF_MOVER_STOP ) ) - CG_RunAMOLerpFrame( ¢->lerpFrame ); - else { - //FIXME: fiddle with params so that when anim is resumed the lerp doesn't freak - // cos of the time differential -/* cent->lerpFrame.oldFrameTime = cg.time; - cent->lerpFrame.frameTime = cg.time + 50;*/ + int delta = cg.time - cent->miscTime; + + //hack to prevent "pausing" mucking up the lerping + if( delta > 900 ) + { + cent->lerpFrame.oldFrameTime += delta; + cent->lerpFrame.frameTime += delta; + } + + CG_RunAMOLerpFrame( ¢->lerpFrame ); + cent->miscTime = cg.time; } *old = cent->lerpFrame.oldFrame; |