From 8a24d464b558d46d9d8067f93bfae834c5f0d7d8 Mon Sep 17 00:00:00 2001 From: Tim Angus Date: Fri, 17 Aug 2001 14:10:16 +0000 Subject: Fix for lerp issues --- src/cgame/cg_animmapobj.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'src/cgame/cg_animmapobj.c') 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; -- cgit