- 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:
parent
ddc67fb1bc
commit
0422f40d80
3 changed files with 10 additions and 0 deletions
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue