serialize the remap data of custom translations defined at run time.

This commit is contained in:
Christoph Oelckers 2023-11-19 12:44:22 +01:00
commit 0b36beb10d
6 changed files with 87 additions and 6 deletions

View file

@ -958,6 +958,9 @@ void FLevelLocals::Serialize(FSerializer &arc, bool hubload)
}
arc("saveversion", SaveVersion);
// this sets up some static data needed further down which means it must be done first.
StaticSerializeTranslations(arc);
if (arc.isReading())
{
Thinkers.DestroyAllThinkers();
@ -1039,7 +1042,6 @@ void FLevelLocals::Serialize(FSerializer &arc, bool hubload)
arc("polyobjs", Polyobjects);
SerializeSubsectors(arc, "subsectors");
StatusBar->SerializeMessages(arc);
StaticSerializeTranslations(arc);
canvasTextureInfo.Serialize(arc);
SerializePlayers(arc, hubload);
SerializeSounds(arc);
@ -1071,6 +1073,8 @@ void FLevelLocals::Serialize(FSerializer &arc, bool hubload)
automap->UpdateShowAllLines();
}
// clean up the static data we allocated
StaticClearSerializeTranslationsData();
}