From a7617b2443465417ef418dc89d4736e4a2f58abc Mon Sep 17 00:00:00 2001 From: Paul Chote Date: Sat, 8 Jun 2019 13:16:19 +0100 Subject: [PATCH] Reseed the RNG when restarting a game. --- OpenRA.Game/Game.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/OpenRA.Game/Game.cs b/OpenRA.Game/Game.cs index 73e8e5c536..3761b86356 100644 --- a/OpenRA.Game/Game.cs +++ b/OpenRA.Game/Game.cs @@ -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")