mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-28 15:02:39 +00:00
- clear current levels' snapshots explicitly if saved game loading fails
Levels that are not defined via MAPINFO could keep stalled snapshots data preventing their loading from scratch https://forum.zdoom.org/viewtopic.php?t=70115
This commit is contained in:
parent
5ee272a8b9
commit
1959502a0b
1 changed files with 8 additions and 0 deletions
|
@ -198,6 +198,14 @@ void G_ClearSnapshots (void)
|
|||
{
|
||||
wadlevelinfos[i].Snapshot.Clean();
|
||||
}
|
||||
|
||||
// Clear current levels' snapshots just in case they are not defined via MAPINFO,
|
||||
// so they were not handled by the loop above
|
||||
if (primaryLevel && primaryLevel->info)
|
||||
primaryLevel->info->Snapshot.Clean();
|
||||
if (currentVMLevel && currentVMLevel->info)
|
||||
currentVMLevel->info->Snapshot.Clean();
|
||||
|
||||
// Since strings are only locked when snapshotting a level, unlock them
|
||||
// all now, since we got rid of all the snapshots that cared about them.
|
||||
GlobalACSStrings.UnlockAll();
|
||||
|
|
Loading…
Reference in a new issue