mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-26 22:11:43 +00:00
- Fixed: spynext/prev were unreliable with player prediction.
SVN r4130 (trunk)
This commit is contained in:
parent
3defad92da
commit
62b23901eb
1 changed files with 5 additions and 0 deletions
|
@ -2569,9 +2569,14 @@ void P_UnPredictPlayer ()
|
|||
if (player->cheats & CF_PREDICTING)
|
||||
{
|
||||
AActor *act = player->mo;
|
||||
AActor *savedcamera = player->camera;
|
||||
|
||||
*player = PredictionPlayerBackup;
|
||||
|
||||
// Restore the camera instead of using the backup's copy, because spynext/prev
|
||||
// could cause it to change during prediction.
|
||||
player->camera = savedcamera;
|
||||
|
||||
act->UnlinkFromWorld ();
|
||||
memcpy (&act->x, PredictionActorBackup, sizeof(AActor)-((BYTE *)&act->x-(BYTE *)act));
|
||||
|
||||
|
|
Loading…
Reference in a new issue