Fix automatic advance bug
All checks were successful
Publish Docker image / Push Docker image to Docker Hub (push) Successful in 2m3s

This commit is contained in:
2025-05-14 19:27:21 +02:00
parent 9f4ebf379f
commit f2712bdcec
4 changed files with 90 additions and 25 deletions

View File

@ -315,7 +315,7 @@ io.on('connection', (socket) => {
});
// If battle is finished, notify about new battle
if (result.lobby.currentBattle) {
if (result.lobby.currentBattle && result.lobby.currentBattle !== result.lobby.battles[result.lobby.battles.length - 1]) {
io.to(result.lobbyId).emit('new_battle', {
battle: result.lobby.currentBattle
});