From c1cd3fba66ee9b75e2648cd0469534816facf39c Mon Sep 17 00:00:00 2001 From: Richard Reiber Date: Sun, 6 Jun 2021 00:49:09 +0200 Subject: [PATCH] fix: updated timeout-method for spectator-error --- .../main/java/uulm/teamname/marvelous/server/lobby/Lobby.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Server/src/main/java/uulm/teamname/marvelous/server/lobby/Lobby.java b/Server/src/main/java/uulm/teamname/marvelous/server/lobby/Lobby.java index 280e346..2bb1876 100644 --- a/Server/src/main/java/uulm/teamname/marvelous/server/lobby/Lobby.java +++ b/Server/src/main/java/uulm/teamname/marvelous/server/lobby/Lobby.java @@ -147,10 +147,10 @@ public class Lobby { new EventBuilder(EventType.TimeoutEvent).buildGameStateEvent()); connection.removeParticipant(source); - if(connection.hasPlayer1()){ + if(connection.hasPlayer1() && !connection.hasPlayer2()){ generateWin(connection.getPlayer1()); } - else if(connection.hasPlayer2()) { + else if(!connection.hasPlayer1() && connection.hasPlayer2()) { generateWin(connection.getPlayer2()); } else {