Add LocalRandom to World
To - in the long term - reduce or remove Game.CosmeticRandom.
This commit is contained in:
committed by
Oliver Brakmann
parent
becfc154c5
commit
16e78b8ca8
@@ -41,6 +41,7 @@ namespace OpenRA
|
|||||||
public Session LobbyInfo { get { return OrderManager.LobbyInfo; } }
|
public Session LobbyInfo { get { return OrderManager.LobbyInfo; } }
|
||||||
|
|
||||||
public readonly MersenneTwister SharedRandom;
|
public readonly MersenneTwister SharedRandom;
|
||||||
|
public readonly MersenneTwister LocalRandom;
|
||||||
public readonly IModelCache ModelCache;
|
public readonly IModelCache ModelCache;
|
||||||
|
|
||||||
public Player[] Players = new Player[0];
|
public Player[] Players = new Player[0];
|
||||||
@@ -169,6 +170,7 @@ namespace OpenRA
|
|||||||
Map = map;
|
Map = map;
|
||||||
Timestep = orderManager.LobbyInfo.GlobalSettings.Timestep;
|
Timestep = orderManager.LobbyInfo.GlobalSettings.Timestep;
|
||||||
SharedRandom = new MersenneTwister(orderManager.LobbyInfo.GlobalSettings.RandomSeed);
|
SharedRandom = new MersenneTwister(orderManager.LobbyInfo.GlobalSettings.RandomSeed);
|
||||||
|
LocalRandom = new MersenneTwister();
|
||||||
|
|
||||||
ModelCache = modData.ModelSequenceLoader.CacheModels(map, modData, map.Rules.ModelSequences);
|
ModelCache = modData.ModelSequenceLoader.CacheModels(map, modData, map.Rules.ModelSequences);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user