Permalink
Browse files

- fixed saving.

  • Loading branch information...
coelckers committed Jan 9, 2019
1 parent 0b2daaf commit 21ac6ab97fe894530f2fc66820c70c38919ffa60
Showing with 4 additions and 3 deletions.
  1. +4 −0 src/g_level.cpp
  2. +0 −3 src/p_saveg.cpp
@@ -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);

}

0 comments on commit 21ac6ab

Please sign in to comment.