From 257c043e5897ae3523b4e58824ac3dd8a97eb6c3 Mon Sep 17 00:00:00 2001 From: Paul Chote Date: Thu, 3 Sep 2015 18:06:56 +0100 Subject: [PATCH] Add Timestep property to GlobalSettings. --- OpenRA.Game/Game.cs | 2 +- OpenRA.Game/Network/Session.cs | 1 + OpenRA.Game/World.cs | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/OpenRA.Game/Game.cs b/OpenRA.Game/Game.cs index efaaaf0f39..8441202676 100644 --- a/OpenRA.Game/Game.cs +++ b/OpenRA.Game/Game.cs @@ -147,7 +147,7 @@ namespace OpenRA using (new PerfTimer("PrepareMap")) map = ModData.PrepareMap(mapUID); 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); diff --git a/OpenRA.Game/Network/Session.cs b/OpenRA.Game/Network/Session.cs index 5d33cf98bc..9c7c6c5d22 100644 --- a/OpenRA.Game/Network/Session.cs +++ b/OpenRA.Game/Network/Session.cs @@ -172,6 +172,7 @@ namespace OpenRA.Network { public string ServerName; public string Map; + public int Timestep = 40; public int OrderLatency = 3; // net tick frames (x 120 = ms) public int RandomSeed = 0; public bool FragileAlliances = false; // Allow diplomatic stance changes after game start. diff --git a/OpenRA.Game/World.cs b/OpenRA.Game/World.cs index 04140c7b7d..98448eb2f8 100644 --- a/OpenRA.Game/World.cs +++ b/OpenRA.Game/World.cs @@ -144,6 +144,7 @@ namespace OpenRA OrderManager = orderManager; orderGenerator = new UnitOrderGenerator(); Map = map; + Timestep = orderManager.LobbyInfo.GlobalSettings.Timestep; TileSet = map.Rules.TileSets[Map.Tileset]; SharedRandom = new MersenneTwister(orderManager.LobbyInfo.GlobalSettings.RandomSeed);