created prestart message: add 2 second delay before starting public games to allow all players to connect

This commit is contained in:
Evan
2025-04-03 15:42:25 -07:00
parent f09801fe3e
commit 950344c0bd
8 changed files with 105 additions and 33 deletions
+4
View File
@@ -154,6 +154,10 @@ export function startWorker() {
log.warn(`cannot update public game ${game.id}, ip: ${clientIP}`);
return res.status(400);
}
if (game.hasStarted()) {
log.warn(`cannot update game ${game.id} after it has started`);
return res.status(400);
}
game.updateGameConfig({
gameMap: req.body.gameMap,
difficulty: req.body.difficulty,