Refactor GameSpeed setting
*Remove internal GameSpeed defaults Enforce setting values explicitly all the time Require definition of a DefaultSpeed *Remove Global.Timestep default *Remove the hacky Timestep/OrderLatency setting via LobbyInfo *Fix shellmaps ignoring mod-defined gamespeeds *Make DateTimeGlobal use the MapOptions gamespeed
This commit is contained in:
@@ -58,7 +58,6 @@ namespace OpenRA.Mods.Common.Traits
|
||||
int lastIncome;
|
||||
int lastIncomeTick;
|
||||
int ticks;
|
||||
int replayTimestep;
|
||||
|
||||
bool armyGraphDisabled;
|
||||
bool incomeGraphDisabled;
|
||||
@@ -81,7 +80,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
{
|
||||
ticks++;
|
||||
|
||||
var timestep = self.World.IsReplay ? replayTimestep : self.World.Timestep;
|
||||
var timestep = self.World.Timestep;
|
||||
if (ticks * timestep >= 30000)
|
||||
{
|
||||
ticks = 0;
|
||||
@@ -124,9 +123,6 @@ namespace OpenRA.Mods.Common.Traits
|
||||
|
||||
public void WorldLoaded(World w, WorldRenderer wr)
|
||||
{
|
||||
if (w.IsReplay)
|
||||
replayTimestep = w.WorldActor.Trait<MapOptions>().GameSpeed.Timestep;
|
||||
|
||||
if (!armyGraphDisabled)
|
||||
ArmySamples.Add(ArmyValue);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user