Fixed NullReferenceExceptions if in the netlobby when a round ends, fixed chatmsgbox staying disabled after being stunned
This commit is contained in:
@@ -200,6 +200,8 @@ namespace Barotrauma
|
||||
GameMain.NetworkMember = null;
|
||||
}
|
||||
|
||||
GameMain.GameSession = null;
|
||||
|
||||
GameMain.MainMenuScreen.Select();
|
||||
//Game1.MainMenuScreen.SelectTab(null, (int)MainMenuScreen.Tabs.Main);
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user