- moved main polyobject array into FLevelLocals and simplified the setup process to not depend on P_SpawnMapThing.
Since the SpawnedThings array is still available when polyobjects are spawned it makes no sense to create an expensive linked list in P_SpawnMapThing. This can be done far better by scanning through the array again and collect all matching items in a second array.
This commit is contained in:
parent
84a28454dc
commit
64595abe60
12 changed files with 72 additions and 126 deletions
|
|
@ -935,7 +935,7 @@ void G_SerializeLevel(FSerializer &arc, bool hubload)
|
|||
if (arc.GetSize("linedefs") != level.lines.Size() ||
|
||||
arc.GetSize("sidedefs") != level.sides.Size() ||
|
||||
arc.GetSize("sectors") != level.sectors.Size() ||
|
||||
arc.GetSize("polyobjs") != (unsigned)po_NumPolyobjs ||
|
||||
arc.GetSize("polyobjs") != level.Polyobjects.Size() ||
|
||||
memcmp(chk, level.md5, 16))
|
||||
{
|
||||
I_Error("Savegame is from a different level");
|
||||
|
|
@ -1007,7 +1007,7 @@ void G_SerializeLevel(FSerializer &arc, bool hubload)
|
|||
// [ZZ] serialize events
|
||||
E_SerializeEvents(arc);
|
||||
DThinker::SerializeThinkers(arc, hubload);
|
||||
arc.Array("polyobjs", polyobjs, po_NumPolyobjs);
|
||||
arc("polyobjs", level.Polyobjects);
|
||||
SerializeSubsectors(arc, "subsectors");
|
||||
StatusBar->SerializeMessages(arc);
|
||||
AM_SerializeMarkers(arc);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue