- Fixed: spynext/prev were unreliable with player prediction.

SVN r4130 (trunk)
This commit is contained in:
Randy Heit 2013-02-12 23:23:33 +00:00
parent 3defad92da
commit 62b23901eb
1 changed files with 5 additions and 0 deletions

View File

@ -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));