- immediately abort loading a savegame if object deserialization fails.
If the loader is allowed to go on, these objects will be linked into game structures and may do unpredictable things before the loader has a chance to abort at the end.
This commit is contained in:
parent
43b0fcbb92
commit
668ebd9be1
3 changed files with 4 additions and 0 deletions
|
|
@ -956,6 +956,8 @@ void FLevelLocals::Serialize(FSerializer &arc, bool hubload)
|
|||
Thinkers.DestroyAllThinkers();
|
||||
interpolator.ClearInterpolations();
|
||||
arc.ReadObjects(hubload);
|
||||
// If there have been object deserialization errors we must absolutely not continue here because scripted objects can do unpredictable things.
|
||||
if (arc.mObjectErrors) I_Error("Failed to load savegame");
|
||||
}
|
||||
|
||||
arc("multiplayer", multiplayer);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue