mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-26 22:11:43 +00:00
- fixed saving.
This commit is contained in:
parent
0b2daaf20f
commit
21ac6ab97f
2 changed files with 4 additions and 3 deletions
|
@ -1675,8 +1675,10 @@ void G_SnapshotLevel ()
|
|||
if (arc.OpenWriter(save_formatted))
|
||||
{
|
||||
SaveVersion = SAVEVER;
|
||||
arc.SetLevel(&level);
|
||||
G_SerializeLevel(arc, &level, false);
|
||||
level.info->Snapshot = arc.GetCompressedOutput();
|
||||
arc.SetLevel(nullptr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1702,7 +1704,9 @@ void G_UnSnapshotLevel (bool hubLoad)
|
|||
return;
|
||||
}
|
||||
|
||||
arc.SetLevel(&level);
|
||||
G_SerializeLevel (arc, &level, hubLoad);
|
||||
arc.SetLevel(nullptr);
|
||||
level.FromSnapshot = true;
|
||||
|
||||
TThinkerIterator<AActor> it(NAME_PlayerPawn);
|
||||
|
|
|
@ -923,8 +923,6 @@ void G_SerializeLevel(FSerializer &arc, FLevelLocals *Level, bool hubload)
|
|||
{
|
||||
int i = Level->totaltime;
|
||||
|
||||
arc.SetLevel(&level);
|
||||
|
||||
if (arc.isWriting())
|
||||
{
|
||||
arc.Array("checksum", Level->md5, 16);
|
||||
|
@ -1039,6 +1037,5 @@ void G_SerializeLevel(FSerializer &arc, FLevelLocals *Level, bool hubload)
|
|||
}
|
||||
AActor::RecreateAllAttachedLights();
|
||||
InitPortalGroups(Level);
|
||||
arc.SetLevel(nullptr);
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue