]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
fix interpolation of cl_movement
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 18 May 2005 04:08:47 +0000 (04:08 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 18 May 2005 04:08:47 +0000 (04:08 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@5309 d7cf8633-e32d-0410-b094-e92efae38249

cl_main.c

index 29fad13afb76c56232b6620a4a0b1ee11f08fc83..00401515687b547ee5cdcb9d50baf2942482e68a 100644 (file)
--- a/cl_main.c
+++ b/cl_main.c
@@ -641,7 +641,7 @@ void CL_LinkNetworkEntity(entity_t *e)
                // if it's the player entity, update according to client movement
                if (e == cl_entities + cl.playerentity && cl.movement)
                {
-                       lerp = (cl.time - cl.mtime[0]) / (cl.mtime[0] - cl.mtime[1]);
+                       lerp = (cl.time - cl.mtime[1]) / (cl.mtime[0] - cl.mtime[1]);
                        lerp = bound(0, lerp, 1);
                        VectorLerp(cl.movement_oldorigin, lerp, cl.movement_origin, origin);
                        VectorSet(angles, 0, cl.viewangles[1], 0);