Fixed EndGame not working properly + Fixed exception when clients disconnected during a round

This commit is contained in:
juanjp600
2017-06-22 15:20:11 -03:00
parent c1780fa7b7
commit 72d5cb227b
5 changed files with 47 additions and 14 deletions
@@ -1381,18 +1381,16 @@ namespace Barotrauma.Networking
public IEnumerable<object> EndCinematic()
{
float endPreviewLength = 10.0f;
var cinematic = new TransitionCinematic(Submarine.MainSub, GameMain.GameScreen.Cam, endPreviewLength);
new TransitionCinematic(Submarine.MainSub, GameMain.GameScreen.Cam, endPreviewLength);
float secondsLeft = endPreviewLength;
//float secondsLeft = endPreviewLength;
do
{
secondsLeft -= CoroutineManager.UnscaledDeltaTime;
//secondsLeft -= CoroutineManager.UnscaledDeltaTime;
yield return CoroutineStatus.Running;
} while (secondsLeft > 0.0f);
} while (cinematic.Running);//(secondsLeft > 0.0f);
Submarine.Unload();
entityEventManager.Clear();