mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-28 15:02:39 +00:00
- fixed: During hub travel, static thinkers may not be deserialized.
Since they are static, the version that got carried over from the last level will still be there and the more current version.
This commit is contained in:
parent
3d8821ee82
commit
c73b71807b
2 changed files with 31 additions and 27 deletions
|
@ -179,7 +179,10 @@ void DThinker::SerializeThinkers(FSerializer &arc, bool hubLoad)
|
|||
{
|
||||
for (i = 0; i <= MAX_STATNUM; i++)
|
||||
{
|
||||
|
||||
if (arc.BeginArray(nullptr))
|
||||
{
|
||||
if (!hubLoad || i != STAT_STATIC) // do not load static thinkers in a hub transition because they'd just duplicate the active ones.
|
||||
{
|
||||
int size = arc.ArraySize();
|
||||
for (int j = 0; j < size; j++)
|
||||
|
@ -213,6 +216,7 @@ void DThinker::SerializeThinkers(FSerializer &arc, bool hubLoad)
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
arc.EndArray();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -996,7 +996,7 @@ void G_SerializeLevel(FSerializer &arc, bool hubload)
|
|||
|
||||
// [ZZ] serialize events
|
||||
E_SerializeEvents(arc);
|
||||
DThinker::SerializeThinkers(arc, !hubload);
|
||||
DThinker::SerializeThinkers(arc, hubload);
|
||||
arc.Array("polyobjs", polyobjs, po_NumPolyobjs);
|
||||
SerializeSubsectors(arc, "subsectors");
|
||||
StatusBar->SerializeMessages(arc);
|
||||
|
|
Loading…
Reference in a new issue