Clarify method name

This commit is contained in:
Paul Chote
2010-01-04 21:12:35 +13:00
parent 88c3e21ed0
commit 5fdba51536
2 changed files with 4 additions and 4 deletions

View File

@@ -26,8 +26,8 @@ namespace OpenRa.Game.Traits
protected override void QueueAttack( Actor self, Order order )
{
var bi = self.traits.Get<Building>();
if (bi != null && !bi.IsActive())
var b = self.traits.Get<Building>();
if (b != null && b.InsuffientPower())
return;
const int RangeTolerance = 1; /* how far inside our maximum range we should try to sit */

View File

@@ -23,9 +23,9 @@ namespace OpenRa.Game.Traits
* ((float2)self.Location + .5f * (float2)unitInfo.Dimensions);
}
public bool IsActive()
public bool InsuffientPower()
{
return !(isPoweredDown || (unitInfo.Powered && self.Owner.GetPowerState() != PowerState.Normal));
return (isPoweredDown || (unitInfo.Powered && self.Owner.GetPowerState() != PowerState.Normal));
}
public int GetPowerUsage()