mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-13 16:07:45 +00:00
Fixed static handlers being OF_Fixed: only global (non-map) static handlers should be fixed.
This commit is contained in:
parent
76b99da4b3
commit
ba4a74265c
1 changed files with 2 additions and 2 deletions
|
@ -18,7 +18,7 @@ bool E_RegisterHandler(DStaticEventHandler* handler)
|
||||||
if (handler->next)
|
if (handler->next)
|
||||||
handler->next->prev = handler;
|
handler->next->prev = handler;
|
||||||
E_FirstEventHandler = handler;
|
E_FirstEventHandler = handler;
|
||||||
if (handler->IsStatic() && handler->isMapScope) handler->ObjectFlags |= OF_Fixed;
|
if (handler->IsStatic() && !handler->isMapScope) handler->ObjectFlags |= OF_Fixed;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -35,7 +35,7 @@ bool E_UnregisterHandler(DStaticEventHandler* handler)
|
||||||
handler->next->prev = handler->prev;
|
handler->next->prev = handler->prev;
|
||||||
if (handler == E_FirstEventHandler)
|
if (handler == E_FirstEventHandler)
|
||||||
E_FirstEventHandler = handler->next;
|
E_FirstEventHandler = handler->next;
|
||||||
if (handler->IsStatic() && handler->isMapScope)
|
if (handler->IsStatic() && !handler->isMapScope)
|
||||||
{
|
{
|
||||||
handler->ObjectFlags |= OF_YesReallyDelete;
|
handler->ObjectFlags |= OF_YesReallyDelete;
|
||||||
delete handler;
|
delete handler;
|
||||||
|
|
Loading…
Reference in a new issue