Add LocalRandom to World

To - in the long term - reduce or remove Game.CosmeticRandom.
This commit is contained in:
reaperrr
2018-11-04 17:41:44 +01:00
committed by Oliver Brakmann
parent becfc154c5
commit 16e78b8ca8

View File

@@ -41,6 +41,7 @@ namespace OpenRA
public Session LobbyInfo { get { return OrderManager.LobbyInfo; } }
public readonly MersenneTwister SharedRandom;
public readonly MersenneTwister LocalRandom;
public readonly IModelCache ModelCache;
public Player[] Players = new Player[0];
@@ -169,6 +170,7 @@ namespace OpenRA
Map = map;
Timestep = orderManager.LobbyInfo.GlobalSettings.Timestep;
SharedRandom = new MersenneTwister(orderManager.LobbyInfo.GlobalSettings.RandomSeed);
LocalRandom = new MersenneTwister();
ModelCache = modData.ModelSequenceLoader.CacheModels(map, modData, map.Rules.ModelSequences);