moved internal time step setting to Game
player should not be able change it as it is not synced yet
This commit is contained in:
@@ -163,14 +163,15 @@ namespace OpenRA
|
|||||||
|
|
||||||
static void TickInner(OrderManager orderManager)
|
static void TickInner(OrderManager orderManager)
|
||||||
{
|
{
|
||||||
int t = Environment.TickCount;
|
var t = Environment.TickCount;
|
||||||
int dt = t - orderManager.LastTickTime;
|
var dt = t - orderManager.LastTickTime;
|
||||||
if (dt >= Settings.Game.Timestep)
|
var world = orderManager.world;
|
||||||
|
var timestep = world == null ? Timestep : world.Timestep;
|
||||||
|
if (dt >= timestep)
|
||||||
using (new PerfSample("tick_time"))
|
using (new PerfSample("tick_time"))
|
||||||
{
|
{
|
||||||
orderManager.LastTickTime += Settings.Game.Timestep;
|
orderManager.LastTickTime += timestep;
|
||||||
Ui.Tick();
|
Ui.Tick();
|
||||||
var world = orderManager.world;
|
|
||||||
if (orderManager.GameStarted)
|
if (orderManager.GameStarted)
|
||||||
++Viewport.TicksSinceLastMove;
|
++Viewport.TicksSinceLastMove;
|
||||||
|
|
||||||
|
|||||||
@@ -135,9 +135,6 @@ namespace OpenRA.GameRules
|
|||||||
public bool AlwaysShowStatusBars = false;
|
public bool AlwaysShowStatusBars = false;
|
||||||
public bool TeamHealthColors = false;
|
public bool TeamHealthColors = false;
|
||||||
|
|
||||||
// Internal game settings
|
|
||||||
public int Timestep = 40;
|
|
||||||
|
|
||||||
public bool AllowDownloading = true;
|
public bool AllowDownloading = true;
|
||||||
public string[] MapRepositories = { "http://resource.openra.net/map/", "http://resource.ihptru.net:8080/map/" };
|
public string[] MapRepositories = { "http://resource.openra.net/map/", "http://resource.ihptru.net:8080/map/" };
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -479,7 +479,6 @@
|
|||||||
<Compile Include="Widgets\Logic\DisconnectWatcherLogic.cs" />
|
<Compile Include="Widgets\Logic\DisconnectWatcherLogic.cs" />
|
||||||
<Compile Include="Activities\FlyFollow.cs" />
|
<Compile Include="Activities\FlyFollow.cs" />
|
||||||
<Compile Include="Modifiers\DisabledOverlay.cs" />
|
<Compile Include="Modifiers\DisabledOverlay.cs" />
|
||||||
<Compile Include="Widgets\Logic\ReplayControlBarLogic.cs" />
|
|
||||||
<Compile Include="Widgets\Logic\GameTimerLogic.cs" />
|
<Compile Include="Widgets\Logic\GameTimerLogic.cs" />
|
||||||
<Compile Include="Immobile.cs" />
|
<Compile Include="Immobile.cs" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|||||||
Reference in New Issue
Block a user