fix disable-DOME bug. move call to PerfHistory.Tick so that the graph is correct in multiplayer.

This commit is contained in:
Bob
2010-02-11 10:47:37 +13:00
parent b630fe05d4
commit 1e652dbcc1
2 changed files with 7 additions and 4 deletions

View File

@@ -158,13 +158,13 @@ namespace OpenRa
controller.selection.Tick(world);
world.Tick();
PerfHistory.Tick();
}
else
if (orderManager.FrameNumber == 0)
lastTime = Environment.TickCount;
}
PerfHistory.Tick();
}
using (new PerfSample("render"))

View File

@@ -2,7 +2,10 @@
namespace OpenRa.Traits
{
class ProvidesRadarInfo : StatelessTraitInfo<ProvidesRadar> {}
class ProvidesRadarInfo : ITraitInfo
{
public object Create( Actor self ) { return new ProvidesRadar(); }
}
class ProvidesRadar : ITick
{
@@ -14,7 +17,7 @@ namespace OpenRa.Traits
{
// Check if powered
var b = self.traits.Get<Building>();
if (b != null && b.Disabled) return false;
if (b.Disabled) return false;
var isJammed = self.World.Queries.WithTrait<JamsRadar>().Any(a => self.Owner != a.Actor.Owner
&& (self.Location - a.Actor.Location).Length < a.Actor.Info.Traits.Get<JamsRadarInfo>().Range);