From b0ccfde66fd740e58f5f63eab87d4c6e3feba41a Mon Sep 17 00:00:00 2001 From: havoc Date: Mon, 12 Feb 2007 20:36:11 +0000 Subject: [PATCH] removed cl.timenonlerp (reverted to using cl.time) git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@6834 d7cf8633-e32d-0410-b094-e92efae38249 --- cl_input.c | 4 ++-- cl_main.c | 2 +- cl_parse.c | 2 -- client.h | 6 ------ host.c | 1 - 5 files changed, 3 insertions(+), 12 deletions(-) diff --git a/cl_input.c b/cl_input.c index 1b4e37d3..d6295960 100644 --- a/cl_input.c +++ b/cl_input.c @@ -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; diff --git a/cl_main.c b/cl_main.c index f7c5ecab..6ed49857 100644 --- 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; diff --git a/cl_parse.c b/cl_parse.c index 64cd45b2..e829ca6c 100644 --- a/cl_parse.c +++ b/cl_parse.c @@ -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 diff --git a/client.h b/client.h index 6bbaf39d..711ad4e4 100644 --- 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 db6c3db4..0e2f91e1 100644 --- 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(); -- 2.39.2