(bb2624736) Don't keep running the end round cinematic if the player leaves the game screen. Otherwise the player can, for example, quickly start a new single player round or switch to the sub editor, and have the game crash when then end round cinematic finishes and unloads the sub.

This commit is contained in:
Joonas Rikkonen
2019-06-04 15:37:52 +03:00
parent 62646dfc96
commit 822322e669

View File

@@ -1199,7 +1199,7 @@ namespace Barotrauma.Networking
{
secondsLeft -= CoroutineManager.UnscaledDeltaTime;
yield return CoroutineStatus.Running;
} while (secondsLeft > 0.0f);
} while (secondsLeft > 0.0f && Screen.Selected == GameMain.GameScreen);
}
Submarine.Unload();