mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-28 06:53:58 +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)
|
if (player->cheats & CF_PREDICTING)
|
||||||
{
|
{
|
||||||
AActor *act = player->mo;
|
AActor *act = player->mo;
|
||||||
|
AActor *savedcamera = player->camera;
|
||||||
|
|
||||||
*player = PredictionPlayerBackup;
|
*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 ();
|
act->UnlinkFromWorld ();
|
||||||
memcpy (&act->x, PredictionActorBackup, sizeof(AActor)-((BYTE *)&act->x-(BYTE *)act));
|
memcpy (&act->x, PredictionActorBackup, sizeof(AActor)-((BYTE *)&act->x-(BYTE *)act));
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue