]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
removed cl.timenonlerp (reverted to using cl.time)
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 12 Feb 2007 20:36:11 +0000 (20:36 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 12 Feb 2007 20:36:11 +0000 (20:36 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@6834 d7cf8633-e32d-0410-b094-e92efae38249

cl_input.c
cl_main.c
cl_parse.c
client.h
host.c

index 1b4e37d33e053679d1369dd5f9aabbbbd0abef27..d629596066163e10ca9aa38c69ef0380fed35151 100644 (file)
@@ -1179,7 +1179,7 @@ void CL_ClientMovement_Replay(void)
        {
                cl.movement_time[1] = cl.movecmd[1].time;
                cl.movement_time[0] = cl.movecmd[0].time;
-               cl.movement_time[2] = cl.timenonlerp;
+               cl.movement_time[2] = cl.time;
                VectorCopy(cl.movement_origin, cl.movement_oldorigin);
                VectorCopy(s.origin, cl.movement_origin);
                VectorCopy(s.velocity, cl.movement_velocity);
@@ -1290,7 +1290,7 @@ void CL_SendMove(void)
                lastsendtime = max(lastsendtime + packettime, realtime);
        }
 
-       cl.cmd.time = cls.protocol == PROTOCOL_QUAKEWORLD ? realtime : cl.timenonlerp;
+       cl.cmd.time = cls.protocol == PROTOCOL_QUAKEWORLD ? realtime : cl.time;
 
        buf.maxsize = sizeof(data);
        buf.cursize = 0;
index f7c5ecabde03681bfdf55dba92cb2c1800fae25d..6ed498570bbd8d089a74f0bec3e076acb2f90f9a 100644 (file)
--- a/cl_main.c
+++ b/cl_main.c
@@ -877,7 +877,7 @@ void CL_UpdateNetworkEntity(entity_t *e, int recursionlimit)
        // if it's the player entity, update according to client movement
        if (e == cl.entities + cl.playerentity && cl.movement_predicted)
        {
-               lerp = (cl.timenonlerp - cl.movement_time[2]) / (cl.movement_time[0] - cl.movement_time[1]);
+               lerp = (cl.time - cl.movement_time[2]) / (cl.movement_time[0] - cl.movement_time[1]);
                lerp = bound(0, lerp, 1);
                if (cl_nolerp.integer)
                        lerp = 1;
index 64cd45b2b757fb2520e65ce9af653af51724d3f9..e829ca6cbbbf47b960be1fa8762e0915ee115490 100644 (file)
@@ -2548,7 +2548,6 @@ void CL_ParseServerMessage(void)
                cl.mtime[1] = cl.mtime[0];
                cl.mtime[0] = realtime; // qw has no clock
                cl.time = bound(cl.mtime[1], cl.time, cl.mtime[0]);
-               cl.timenonlerp = bound(cl.mtime[1], cl.timenonlerp, cl.mtime[0]);
                cl.onground = false; // since there's no clientdata parsing, clear the onground flag here
                // if true the cl.viewangles are interpolated from cl.mviewangles[]
                // during this frame
@@ -2970,7 +2969,6 @@ void CL_ParseServerMessage(void)
                                cl.mtime[1] = cl.mtime[0];
                                cl.mtime[0] = MSG_ReadFloat ();
                                cl.time = bound(cl.mtime[1], cl.time, cl.mtime[0]);
-                               cl.timenonlerp = bound(cl.mtime[1], cl.timenonlerp, cl.mtime[0]);
                                cl.movement_needupdate = true;
                                // if true the cl.viewangles are interpolated from cl.mviewangles[]
                                // during this frame
index 6bbaf39d5484d23b7ce2528c81acb102382c72d9..711ad4e435a9d4b392794181ce6a527a4afd2da1 100644 (file)
--- a/client.h
+++ b/client.h
@@ -747,12 +747,6 @@ typedef struct client_state_s
        // the timestamp of the last two messages
        double mtime[2];
 
-       // similar to cl.time but this can go past cl.mtime[0] when packets are
-       // not being received, it is still clamped to the cl.mtime[1] to
-       // cl.mtime[0] range whenever a packet is received, it just does not stop
-       // when interpolation finishes
-       double timenonlerp;
-
        // clients view of time, time should be between mtime[0] and mtime[1] to
        // generate a lerp point for other data, oldtime is the previous frame's
        // value of time, frametime is the difference between time and oldtime
diff --git a/host.c b/host.c
index db6c3db4dc25591a87d32b46a8471f6f7495ec70..0e2f91e1174a0f3b29851c480974b4deed343847 100644 (file)
--- a/host.c
+++ b/host.c
@@ -799,7 +799,6 @@ void Host_Main(void)
 
                                cl.oldtime = cl.time;
                                cl.time += frametime;
-                               cl.timenonlerp += frametime;
 
                                // Collect input into cmd
                                CL_Move();