Reseed the RNG when restarting a game.

This commit is contained in:
Paul Chote
2019-06-08 13:16:19 +01:00
committed by abcdefg30
parent 586fa80943
commit a7617b2443

View File

@@ -197,6 +197,10 @@ namespace OpenRA
var replay = OrderManager.Connection as ReplayConnection;
var replayName = replay != null ? replay.Filename : null;
var lobbyInfo = OrderManager.LobbyInfo;
// Reseed the RNG so this isn't an exact repeat of the last game
lobbyInfo.GlobalSettings.RandomSeed = CosmeticRandom.Next();
var orders = new[] {
Order.Command("sync_lobby {0}".F(lobbyInfo.Serialize())),
Order.Command("startgame")