- fixed: The serializer must treat object that were already destroyed or are declared transient like a null pointer and not ignore them.

This caused FraggleScript's SpawnedThings array to go out of sync.
This commit is contained in:
Christoph Oelckers 2018-11-25 22:12:21 +01:00 committed by drfrag666
parent c223a671a6
commit 273c02ee73

View file

@ -1593,17 +1593,13 @@ FSerializer &Serialize(FSerializer &arc, const char *key, DObject *&value, DObje
if (retcode) *retcode = true;
if (arc.isWriting())
{
if (value != nullptr)
if (value != nullptr && !(value->ObjectFlags & (OF_EuthanizeMe | OF_Transient)))
{
int ndx;
if (value == WP_NOCHANGE)
{
ndx = -1;
}
else if (value->ObjectFlags & (OF_EuthanizeMe | OF_Transient))
{
return arc;
}
else
{
int *pndx = arc.w->mObjectMap.CheckKey(value);