Made global handlers (from GameInfo) implicitly transient, because these never get serialized anyway.

This commit is contained in:
ZZYZX 2017-01-31 02:37:36 +02:00
parent 3c1cecfa2b
commit 9a8a93fe51

View file

@ -23,6 +23,8 @@ bool E_RegisterHandler(DStaticEventHandler* handler)
if (handler->IsStatic())
{
handler->ObjectFlags |= OF_Fixed;
if (!handler->isMapScope) // global (GameInfo) handlers are not serialized.
handler->ObjectFlags |= OF_Transient;
}
return true;
}
@ -42,7 +44,7 @@ bool E_UnregisterHandler(DStaticEventHandler* handler)
E_FirstEventHandler = handler->next;
if (handler->IsStatic())
{
handler->ObjectFlags &= ~OF_Fixed;
handler->ObjectFlags &= ~(OF_Fixed|OF_Transient);
handler->Destroy();
}
return true;