From ba4a74265ca331708cde67018b6fc9533ddd0639 Mon Sep 17 00:00:00 2001 From: ZZYZX Date: Sun, 22 Jan 2017 09:39:33 +0200 Subject: [PATCH] Fixed static handlers being OF_Fixed: only global (non-map) static handlers should be fixed. --- src/events.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/events.cpp b/src/events.cpp index 97b32df418..8927649f40 100755 --- a/src/events.cpp +++ b/src/events.cpp @@ -18,7 +18,7 @@ bool E_RegisterHandler(DStaticEventHandler* handler) if (handler->next) handler->next->prev = handler; E_FirstEventHandler = handler; - if (handler->IsStatic() && handler->isMapScope) handler->ObjectFlags |= OF_Fixed; + if (handler->IsStatic() && !handler->isMapScope) handler->ObjectFlags |= OF_Fixed; return true; } @@ -35,7 +35,7 @@ bool E_UnregisterHandler(DStaticEventHandler* handler) handler->next->prev = handler->prev; if (handler == E_FirstEventHandler) E_FirstEventHandler = handler->next; - if (handler->IsStatic() && handler->isMapScope) + if (handler->IsStatic() && !handler->isMapScope) { handler->ObjectFlags |= OF_YesReallyDelete; delete handler;