This commit is contained in:
2024-06-10 15:24:37 +00:00
parent dadc8d7dd5
commit 42257bd23d
23 changed files with 470 additions and 548 deletions

View File

@@ -35,7 +35,19 @@ export const io = new Server(httpsServer, {
}
});
export const game = new Game();
//Zone update broadcast function, called by the game object
function onUpdateNewZone(newZone) {
playersBroadcast("new_zone", newZone)
secureAdminBroadcast("new_zone", newZone)
}
function onUpdateZone(zone) {
playersBroadcast("zone", zone)
secureAdminBroadcast("zone", zone)
}
export const game = new Game(onUpdateZone, onUpdateNewZone);
export const penaltyController = new PenaltyController();