diff options
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; |