- restored calling OnRegister for event handlers after loading a savegame

It should be said in no uncertain terms that OnRegister operates on an uninitialized level so it should only be used for setting up the registering process of the event handler itself and nothing else - not even the event handler's data!!!
This commit is contained in:
Christoph Oelckers 2019-03-26 17:02:40 +01:00
commit 0422f40d80
3 changed files with 10 additions and 0 deletions

View file

@ -46,6 +46,13 @@
EventManager staticEventManager;
EventManager eventManager;
void EventManager::CallOnRegister()
{
for (DStaticEventHandler* handler = FirstEventHandler; handler; handler = handler->next)
{
handler->OnRegister();
}
}
bool EventManager::RegisterHandler(DStaticEventHandler* handler)
{