Don't predict one frame too far.

We're missusing the current frame to pass data from the input subsystem
to the movement prediction without a server frame. While we can use the
current frame for the movements itself, it's not finished and thus
unsuitable for stair step prediction. Also oldframe is determined
wrongly. As a result the player "jumps" over stairs.
This commit is contained in:
Yamagi Burmeister 2016-08-11 19:11:33 +02:00
parent a9853ae44e
commit a6f4a3b309

View file

@ -298,6 +298,10 @@ CL_PredictMovement(void)
VectorCopy(pm.s.origin, cl.predicted_origins[frame]);
}
/* We need to remove the current frame. Otherwise we're
predicting one frame too far, leading to misses. */
--ack;
oldframe = (ack - 2) & (CMD_BACKUP - 1);
oldz = cl.predicted_origins[oldframe][2];
step = pm.s.origin[2] - oldz;