From 08fca479f58bef21465674829585156b48b79a44 Mon Sep 17 00:00:00 2001 From: Joonas Rikkonen Date: Sun, 31 Mar 2019 19:12:40 +0300 Subject: [PATCH] (50d313d01) Fixed spectate button staying visible when a round ends while a client is in the lobby. --- .../BarotraumaClient/Source/Networking/GameClient.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Barotrauma/BarotraumaClient/Source/Networking/GameClient.cs b/Barotrauma/BarotraumaClient/Source/Networking/GameClient.cs index fdc0164cf..fb6837e05 100644 --- a/Barotrauma/BarotraumaClient/Source/Networking/GameClient.cs +++ b/Barotrauma/BarotraumaClient/Source/Networking/GameClient.cs @@ -1142,9 +1142,13 @@ namespace Barotrauma.Networking public IEnumerable EndGame(string endMessage) { - if (!gameStarted) yield return CoroutineStatus.Success; + if (!gameStarted) + { + GameMain.NetLobbyScreen.Select(); + yield return CoroutineStatus.Success; + } - if (GameMain.GameSession != null) GameMain.GameSession.GameMode.End(endMessage); + if (GameMain.GameSession != null) { GameMain.GameSession.GameMode.End(endMessage); } gameStarted = false; Character.Controlled = null;