mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-24 21:11:39 +00:00
Hopefully I'm using OF_Fixed correctly
This commit is contained in:
parent
fb1d55101e
commit
2de98c2dd3
1 changed files with 6 additions and 0 deletions
|
@ -16,6 +16,7 @@ bool E_RegisterHandler(DStaticEventHandler* handler)
|
|||
if (handler->next)
|
||||
handler->next->prev = handler;
|
||||
E_FirstEventHandler = handler;
|
||||
if (handler->IsStatic()) handler->ObjectFlags |= OF_Fixed;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -32,6 +33,11 @@ bool E_UnregisterHandler(DStaticEventHandler* handler)
|
|||
handler->next->prev = handler->prev;
|
||||
if (handler == E_FirstEventHandler)
|
||||
E_FirstEventHandler = handler->next;
|
||||
if (handler->IsStatic())
|
||||
{
|
||||
handler->ObjectFlags |= OF_YesReallyDelete;
|
||||
delete handler;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue