From: havoc Date: Mon, 14 Oct 2002 19:34:01 +0000 (+0000) Subject: fix jitter in interpolation of monster movement X-Git-Tag: RELEASE_0_2_0_RC1~135 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=7a89b5b74762f67de05cd57ae47bf4ba2df16808;p=xonotic%2Fdarkplaces.git fix jitter in interpolation of monster movement git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@2527 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/cl_parse.c b/cl_parse.c index bcb3a511..82d8ab12 100644 --- a/cl_parse.c +++ b/cl_parse.c @@ -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);