mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-13 07:57:51 +00:00
Made global handlers (from GameInfo) implicitly transient, because these never get serialized anyway.
This commit is contained in:
parent
3c1cecfa2b
commit
9a8a93fe51
1 changed files with 3 additions and 1 deletions
|
@ -23,6 +23,8 @@ bool E_RegisterHandler(DStaticEventHandler* handler)
|
||||||
if (handler->IsStatic())
|
if (handler->IsStatic())
|
||||||
{
|
{
|
||||||
handler->ObjectFlags |= OF_Fixed;
|
handler->ObjectFlags |= OF_Fixed;
|
||||||
|
if (!handler->isMapScope) // global (GameInfo) handlers are not serialized.
|
||||||
|
handler->ObjectFlags |= OF_Transient;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -42,7 +44,7 @@ bool E_UnregisterHandler(DStaticEventHandler* handler)
|
||||||
E_FirstEventHandler = handler->next;
|
E_FirstEventHandler = handler->next;
|
||||||
if (handler->IsStatic())
|
if (handler->IsStatic())
|
||||||
{
|
{
|
||||||
handler->ObjectFlags &= ~OF_Fixed;
|
handler->ObjectFlags &= ~(OF_Fixed|OF_Transient);
|
||||||
handler->Destroy();
|
handler->Destroy();
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in a new issue