- separation of static and map-local event handlers into separate lists.

Having everything lumped together made this a maintenance hassle because it affected how the level has to be stored.
This hasn't been tested yet, so it may not work as intended!
This commit is contained in:
Christoph Oelckers 2019-02-02 16:43:11 +01:00
commit 66eb4e5048
29 changed files with 240 additions and 242 deletions

View file

@ -1173,7 +1173,7 @@ void G_Ticker ()
}
// [ZZ] also tick the UI part of the events
eventManager.UiTick();
primaryLevel->localEventManager->UiTick();
C_RunDelayedCommands();
// do main actions
@ -1213,7 +1213,7 @@ void G_Ticker ()
}
// [MK] Additional ticker for UI events right after all others
eventManager.PostUiTick();
primaryLevel->localEventManager->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
eventManager.PlayerDisconnected(playernum);
mo->Level->localEventManager->PlayerDisconnected(playernum);
// [RH] Let the scripts know the player left
mo->Level->Behaviors.StartTypedScripts(SCRIPT_Disconnect, mo, true, playernum, true);
if (mo != NULL)