From 62b23901eb9ff8c3967b55d3eb814564636cf37c Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Tue, 12 Feb 2013 23:23:33 +0000 Subject: [PATCH] - Fixed: spynext/prev were unreliable with player prediction. SVN r4130 (trunk) --- src/p_user.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/p_user.cpp b/src/p_user.cpp index cb15b18f91..7b332cb0e7 100644 --- a/src/p_user.cpp +++ b/src/p_user.cpp @@ -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));