mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2025-03-31 23:41:25 +00:00
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:
parent
a9853ae44e
commit
a6f4a3b309
1 changed files with 4 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue