From 7cfcd94e234409207c483eecd59e93ead3916604 Mon Sep 17 00:00:00 2001 From: Chris Forbes Date: Wed, 13 Oct 2010 21:00:27 +1300 Subject: [PATCH] #181, #286 fixed -- sharedrandom seed from server is now used. --- OpenRA.Game/World.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/OpenRA.Game/World.cs b/OpenRA.Game/World.cs index 82cd774d84..0bfc04eb99 100644 --- a/OpenRA.Game/World.cs +++ b/OpenRA.Game/World.cs @@ -32,7 +32,7 @@ namespace OpenRA internal readonly OrderManager orderManager; public Session LobbyInfo { get { return orderManager.LobbyInfo; } } - public XRandom SharedRandom = new XRandom(0); + public XRandom SharedRandom; public readonly Dictionary players = new Dictionary(); @@ -95,6 +95,8 @@ namespace OpenRA TileSet = Rules.TileSets[Map.Tileset]; TileSet.LoadTiles(); + SharedRandom = new XRandom(orderManager.LobbyInfo.GlobalSettings.RandomSeed); + WorldActor = CreateActor( "World", new TypeDictionary() ); Queries = new AllQueries(this);