Fixes to server settings. Closes #225

- Selected mode and mission type settings are saved and loaded.
- RandomizeSeed setting can be changed via the debug console and it also has an effect in the dedicated server.
- Dedicated server randomizes sub & mode settings if their selection modes are set to random.
This commit is contained in:
Joonas Rikkonen
2018-01-25 15:09:44 +02:00
parent 490e373c7a
commit a1ccf501c7
6 changed files with 70 additions and 19 deletions
@@ -201,7 +201,9 @@ namespace Barotrauma.Networking
Log("Server started", ServerLog.MessageType.ServerMessage);
GameMain.NetLobbyScreen.Select();
GameMain.NetLobbyScreen.RandomizeSettings();
started = true;
yield return CoroutineStatus.Success;
}
@@ -1480,22 +1482,21 @@ namespace Barotrauma.Networking
}
}
CoroutineManager.StartCoroutine(EndCinematic(),"EndCinematic");
}
CoroutineManager.StartCoroutine(EndCinematic(), "EndCinematic");
GameMain.NetLobbyScreen.RandomizeSettings();
}
public IEnumerable<object> EndCinematic()
{
float endPreviewLength = 10.0f;
var cinematic = new TransitionCinematic(Submarine.MainSub, GameMain.GameScreen.Cam, endPreviewLength);
//float secondsLeft = endPreviewLength;
do
{
//secondsLeft -= CoroutineManager.UnscaledDeltaTime;
yield return CoroutineStatus.Running;
} while (cinematic.Running);//(secondsLeft > 0.0f);
} while (cinematic.Running);
#if CLIENT
SoundPlayer.OverrideMusicType = null;
#endif