cl.time = bound(cl.mtime[1], cl.time, cl.mtime[0]);
// LordHavoc: lerp in listen games as the server is being capped below the client (usually)
- f = cl.mtime[0] - cl.mtime[1];
- if (!f || cl_nolerp.integer || cls.timedemo || (cl.islocalgame && !sv_fixedframeratesingleplayer.integer))
+ if (cl.mtime[0] <= cl.mtime[1] || cl_nolerp.integer || cls.timedemo || (cl.islocalgame && !sv_fixedframeratesingleplayer.integer))
{
cl.time = cl.mtime[0];
return 1;
}
- f = (cl.time - cl.mtime[1]) / f;
+ f = (cl.time - cl.mtime[1]) / (cl.mtime[0] - cl.mtime[1]);
return bound(0, f, 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[]
case svc_time:
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[]