diff --git a/Subsurface/Source/GUI/GUI.cs b/Subsurface/Source/GUI/GUI.cs index d0b082ef6..658de7752 100644 --- a/Subsurface/Source/GUI/GUI.cs +++ b/Subsurface/Source/GUI/GUI.cs @@ -200,6 +200,8 @@ namespace Barotrauma GameMain.NetworkMember = null; } + GameMain.GameSession = null; + GameMain.MainMenuScreen.Select(); //Game1.MainMenuScreen.SelectTab(null, (int)MainMenuScreen.Tabs.Main); diff --git a/Subsurface/Source/GameSession/GameSession.cs b/Subsurface/Source/GameSession/GameSession.cs index eaac483c1..ba2eac0b6 100644 --- a/Subsurface/Source/GameSession/GameSession.cs +++ b/Subsurface/Source/GameSession/GameSession.cs @@ -164,18 +164,18 @@ namespace Barotrauma { if (Mission != null) Mission.End(); - if (GameMain.Server!=null) - { + if (GameMain.Server != null) + { CoroutineManager.StartCoroutine(GameMain.Server.EndGame(endMessage)); } - else if (GameMain.Client==null) + else if (GameMain.Client == null) { //Submarine.Unload(); GameMain.LobbyScreen.Select(); } - - if (shiftSummary!=null) + + if (shiftSummary != null) { GUIFrame summaryFrame = shiftSummary.CreateSummaryFrame(endMessage); GUIMessageBox.MessageBoxes.Enqueue(summaryFrame); diff --git a/Subsurface/Source/Networking/NetworkMember.cs b/Subsurface/Source/Networking/NetworkMember.cs index 61e3f24cd..33dbd6a2d 100644 --- a/Subsurface/Source/Networking/NetworkMember.cs +++ b/Subsurface/Source/Networking/NetworkMember.cs @@ -335,7 +335,7 @@ namespace Barotrauma.Networking if (gameStarted && Screen.Selected == GameMain.GameScreen) { chatMsgBox.Visible = Character.Controlled == null || - (!Character.Controlled.IsUnconscious && Character.Controlled.Stun >= 0.0f); + (!Character.Controlled.IsUnconscious && Character.Controlled.Stun <= 0.0f); inGameHUD.Update(deltaTime);