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 1b4e37d..d629596 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 f7c5eca..6ed4985 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 64cd45b..e829ca6 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 6bbaf39..711ad4e 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 db6c3db..0e2f91e 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();