- made reading of objects from the savegame work.
It turned out this may not be done automatically when opening the savegame - it has to be done later, after the pre-spawned map thinkers and all connected objects have been destroyed. The object deserializer also has to be rather careful about dealing with parse errors, because if something goes wrong a whole batch of uninitialized or partially initialized objects will be left behind to destroy. This means that no object class may assume that anything but the default constructor has been run on it and needs to check any variable it may reference.
This commit is contained in:
parent
a83ea4ddd2
commit
5a3f1dcdb6
4 changed files with 62 additions and 28 deletions
|
|
@ -904,7 +904,7 @@ void G_SerializeLevel(FSerializer &arc, bool hubload)
|
|||
if (arc.isReading())
|
||||
{
|
||||
P_DestroyThinkers(hubload);
|
||||
// ReadObjects
|
||||
arc.ReadObjects();
|
||||
}
|
||||
|
||||
arc("level.flags", level.flags)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue