- made the event manager an object so it can be instantiated multiple times.

This commit is contained in:
Christoph Oelckers 2019-02-02 10:46:34 +01:00
commit 484485f3cf
21 changed files with 257 additions and 246 deletions

View file

@ -1173,7 +1173,7 @@ void G_Ticker ()
}
// [ZZ] also tick the UI part of the events
E_UiTick();
eventManager.UiTick();
C_RunDelayedCommands();
// do main actions
@ -1213,7 +1213,7 @@ void G_Ticker ()
}
// [MK] Additional ticker for UI events right after all others
E_PostUiTick();
eventManager.PostUiTick();
}
@ -1697,7 +1697,7 @@ void G_DoPlayerPop(int playernum)
auto mo = players[playernum].mo;
mo->Level->Behaviors.StopMyScripts(mo);
// [ZZ] fire player disconnect hook
E_PlayerDisconnected(playernum);
eventManager.PlayerDisconnected(playernum);
// [RH] Let the scripts know the player left
mo->Level->Behaviors.StartTypedScripts(SCRIPT_Disconnect, mo, true, playernum, true);
if (mo != NULL)