Add Timestep property to GlobalSettings.

This commit is contained in:
Paul Chote
2015-09-03 18:06:56 +01:00
parent 7912e3c7ff
commit 257c043e58
3 changed files with 3 additions and 1 deletions

View File

@@ -147,7 +147,7 @@ namespace OpenRA
using (new PerfTimer("PrepareMap")) using (new PerfTimer("PrepareMap"))
map = ModData.PrepareMap(mapUID); map = ModData.PrepareMap(mapUID);
using (new PerfTimer("NewWorld")) using (new PerfTimer("NewWorld"))
OrderManager.World = new World(map, OrderManager, type) { Timestep = Timestep }; OrderManager.World = new World(map, OrderManager, type);
worldRenderer = new WorldRenderer(OrderManager.World); worldRenderer = new WorldRenderer(OrderManager.World);

View File

@@ -172,6 +172,7 @@ namespace OpenRA.Network
{ {
public string ServerName; public string ServerName;
public string Map; public string Map;
public int Timestep = 40;
public int OrderLatency = 3; // net tick frames (x 120 = ms) public int OrderLatency = 3; // net tick frames (x 120 = ms)
public int RandomSeed = 0; public int RandomSeed = 0;
public bool FragileAlliances = false; // Allow diplomatic stance changes after game start. public bool FragileAlliances = false; // Allow diplomatic stance changes after game start.

View File

@@ -144,6 +144,7 @@ namespace OpenRA
OrderManager = orderManager; OrderManager = orderManager;
orderGenerator = new UnitOrderGenerator(); orderGenerator = new UnitOrderGenerator();
Map = map; Map = map;
Timestep = orderManager.LobbyInfo.GlobalSettings.Timestep;
TileSet = map.Rules.TileSets[Map.Tileset]; TileSet = map.Rules.TileSets[Map.Tileset];
SharedRandom = new MersenneTwister(orderManager.LobbyInfo.GlobalSettings.RandomSeed); SharedRandom = new MersenneTwister(orderManager.LobbyInfo.GlobalSettings.RandomSeed);