mirror of
https://github.com/ZDoom/qzdoom-gpl.git
synced 2024-11-24 04:41:53 +00:00
Hopefully I'm using OF_Fixed correctly
This commit is contained in:
parent
35ec14f465
commit
890166a732
1 changed files with 6 additions and 0 deletions
|
@ -16,6 +16,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->ObjectFlags |= OF_Fixed;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -32,6 +33,11 @@ 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->ObjectFlags |= OF_YesReallyDelete;
|
||||||
|
delete handler;
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue