]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
fix jitter in interpolation of monster movement
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 14 Oct 2002 19:34:01 +0000 (19:34 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 14 Oct 2002 19:34:01 +0000 (19:34 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@2527 d7cf8633-e32d-0410-b094-e92efae38249

cl_parse.c

index bcb3a5118f95286304570c7ce352e6caa46a099c..82d8ab124037c64ff3070a146b469b1cb3ab3561 100644 (file)
@@ -508,9 +508,9 @@ void CL_MoveLerpEntityStates(entity_t *ent)
        else// if (ent->state_current.flags & RENDER_STEP)
        {
                // monster interpolation
-               if (DotProduct(odelta, odelta) + DotProduct(adelta, adelta) > 0.01 || cl.mtime[0] - ent->persistent.lerpstarttime >= 0.1)
+               if (DotProduct(odelta, odelta) + DotProduct(adelta, adelta) > 0.01/* || cl.mtime[0] - ent->persistent.lerpstarttime >= 0.1*/)
                {
-                       ent->persistent.lerpdeltatime = cl.time - ent->persistent.lerpstarttime;
+                       ent->persistent.lerpdeltatime = bound(0, cl.mtime[1] - ent->persistent.lerpstarttime, 1);
                        ent->persistent.lerpstarttime = cl.mtime[1];
                        VectorCopy(ent->persistent.neworigin, ent->persistent.oldorigin);
                        VectorCopy(ent->persistent.newangles, ent->persistent.oldangles);