From 9a8a93fe516612b13ea7c3da43bf7f42a1cfa4b3 Mon Sep 17 00:00:00 2001 From: ZZYZX Date: Tue, 31 Jan 2017 02:37:36 +0200 Subject: [PATCH] Made global handlers (from GameInfo) implicitly transient, because these never get serialized anyway. --- src/events.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/events.cpp b/src/events.cpp index 80788f072..8eea680a7 100755 --- a/src/events.cpp +++ b/src/events.cpp @@ -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;