{
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);
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;
// 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;
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
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
// 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
cl.oldtime = cl.time;
cl.time += frametime;
- cl.timenonlerp += frametime;
// Collect input into cmd
CL_Move();