timestep control (rate=N); not failing at SharedRandom seed
This commit is contained in:
@@ -132,7 +132,7 @@ namespace OpenRa.Game
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int lastTime = Environment.TickCount;
|
static int lastTime = Environment.TickCount;
|
||||||
public const int timestep = 40;
|
public static int timestep = 40;
|
||||||
|
|
||||||
public static void ResetTimer()
|
public static void ResetTimer()
|
||||||
{
|
{
|
||||||
@@ -259,7 +259,7 @@ namespace OpenRa.Game
|
|||||||
return BuildingInfluence.GetDistanceToBuilding(b);
|
return BuildingInfluence.GetDistanceToBuilding(b);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Random SharedRandom = new Random(); /* for things that require sync */
|
public static Random SharedRandom = new Random(0); /* for things that require sync */
|
||||||
public static Random CosmeticRandom = new Random(); /* for things that are just fluff */
|
public static Random CosmeticRandom = new Random(); /* for things that are just fluff */
|
||||||
|
|
||||||
public static readonly Pair<VoicePool, VoicePool> SovietVoices =
|
public static readonly Pair<VoicePool, VoicePool> SovietVoices =
|
||||||
|
|||||||
@@ -51,6 +51,7 @@ namespace OpenRa.Game
|
|||||||
|
|
||||||
UiOverlay.ShowUnitDebug = settings.GetValue("udebug", false);
|
UiOverlay.ShowUnitDebug = settings.GetValue("udebug", false);
|
||||||
UiOverlay.ShowBuildDebug = settings.GetValue("bdebug", false);
|
UiOverlay.ShowBuildDebug = settings.GetValue("bdebug", false);
|
||||||
|
Game.timestep = settings.GetValue("rate", 40);
|
||||||
WorldRenderer.ShowUnitPaths = settings.GetValue("pathdebug", false);
|
WorldRenderer.ShowUnitPaths = settings.GetValue("pathdebug", false);
|
||||||
Game.Replay = settings.GetValue("replay", "");
|
Game.Replay = settings.GetValue("replay", "");
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user