ore timing too
This commit is contained in:
@@ -143,6 +143,7 @@ namespace OpenRa.Game
|
||||
public static int RenderFrame = 0;
|
||||
public static double RenderTime = 0.0;
|
||||
public static double TickTime = 0.0;
|
||||
public static double OreTime = 0.0;
|
||||
|
||||
public static Stopwatch sw;
|
||||
|
||||
@@ -162,7 +163,9 @@ namespace OpenRa.Game
|
||||
|
||||
if (--oreTicks == 0)
|
||||
{
|
||||
var oresw = new Stopwatch();
|
||||
map.GrowOre(p => IsCellBuildable(p, UnitMovementType.Wheel), SharedRandom);
|
||||
OreTime = oresw.ElapsedTime();
|
||||
oreTicks = oreFrequency;
|
||||
}
|
||||
world.Tick();
|
||||
|
||||
@@ -99,10 +99,11 @@ namespace OpenRa.Game.Graphics
|
||||
|
||||
lineRenderer.Flush();
|
||||
|
||||
renderer.DrawText(string.Format("RenderFrame {0} ({2:F1} ms) Tick {1} ({3:F1} ms)",
|
||||
renderer.DrawText(string.Format("RenderFrame {0} ({2:F1} ms) Tick {1} ({3:F1} ms) Ore ({4:F1} ms)",
|
||||
Game.RenderFrame, Game.orderManager.FrameNumber,
|
||||
Game.RenderTime * 1000,
|
||||
Game.TickTime * 1000), new int2(5, 5), Color.White);
|
||||
Game.TickTime * 1000,
|
||||
Game.OreTime * 1000), new int2(5, 5), Color.White);
|
||||
}
|
||||
|
||||
const float conditionYellow = 0.5f; /* todo: get these from gamerules */
|
||||
|
||||
Reference in New Issue
Block a user