mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-13 07:57:52 +00:00
Unprediction needs to restore selected inventory
This commit is contained in:
parent
981b5f32e0
commit
0f9a8176f5
1 changed files with 7 additions and 1 deletions
|
@ -2744,9 +2744,12 @@ void P_UnPredictPlayer ()
|
||||||
if (player->cheats & CF_PREDICTING)
|
if (player->cheats & CF_PREDICTING)
|
||||||
{
|
{
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
AActor *act = player->mo;
|
APlayerPawn *act = player->mo;
|
||||||
AActor *savedcamera = player->camera;
|
AActor *savedcamera = player->camera;
|
||||||
|
|
||||||
|
TObjPtr<AInventory> InvSel = act->InvSel;
|
||||||
|
int inventorytics = player->inventorytics;
|
||||||
|
|
||||||
*player = PredictionPlayerBackup;
|
*player = PredictionPlayerBackup;
|
||||||
|
|
||||||
// Restore the camera instead of using the backup's copy, because spynext/prev
|
// Restore the camera instead of using the backup's copy, because spynext/prev
|
||||||
|
@ -2859,6 +2862,9 @@ void P_UnPredictPlayer ()
|
||||||
}
|
}
|
||||||
block = block->NextBlock;
|
block = block->NextBlock;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
act->InvSel = InvSel;
|
||||||
|
player->inventorytics = inventorytics;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue