// movement lerp
// if it's the predicted player entity, update according to client movement
- if (e == cl.entities + cl.playerentity && cl.movement_predicted)
+ // but don't lerp if going through a teleporter as it causes a bad lerp
+ // also don't use the predicted location if fixangle was set on both of
+ // the most recent server messages, as that cause means you are spectating
+ // someone or watching a cutscene of some sort
+ if (e == cl.entities + cl.playerentity && cl.movement_predicted && (!cl.fixangle[1] || !cl.fixangle[0]))
{
lerp = (cl.time - cl.movement_time[2]) / (cl.movement_time[0] - cl.movement_time[1]);
lerp = bound(0, lerp, 1);
- if (cl_nolerp.integer)
+ if (!interpolate || cl_nolerp.integer || cl.fixangle[0])
lerp = 1;
VectorLerp(cl.movement_oldorigin, lerp, cl.movement_origin, origin);
VectorSet(angles, 0, cl.viewangles[1], 0);