Actor properties consistency improved

This commit is contained in:
huwpascoe
2014-11-10 14:20:19 +00:00
parent 6a425b8636
commit a660bb95b5
58 changed files with 109 additions and 120 deletions

View File

@@ -30,7 +30,7 @@ namespace OpenRA.Mods.Common.Effects
public void Tick(World world)
{
if (!a.IsInWorld || a.IsDead() || !a.Trait<CanPowerDown>().Disabled)
if (!a.IsInWorld || a.IsDead || !a.Trait<CanPowerDown>().Disabled)
world.AddFrameEndTask(w => w.Remove(this));
anim.Tick();

View File

@@ -48,7 +48,7 @@ namespace OpenRA.Mods.Common.Effects
circles.Play("circles");
}
if (!building.IsInWorld || building.IsDead())
if (!building.IsInWorld || building.IsDead)
world.AddFrameEndTask(w => w.Remove(this));
}

View File

@@ -148,7 +148,7 @@ namespace OpenRA.Mods.Common.Power
{
var actors = self.World.ActorsWithTrait<AffectedByPowerOutage>()
.Select(tp => tp.Actor)
.Where(a => !a.IsDead() && a.IsInWorld && a.Owner == self.Owner);
.Where(a => !a.IsDead && a.IsInWorld && a.Owner == self.Owner);
UpdateActors(actors);
}

View File

@@ -35,7 +35,7 @@ namespace OpenRA.Mods.Common
{
if (claim.Claimer.Destroyed) return;
if (!claim.Claimer.IsInWorld) return;
if (claim.Claimer.IsDead()) return;
if (claim.Claimer.IsDead) return;
claim.Claimer.Trait<INotifyResourceClaimLost>().OnNotifyResourceClaimLost(claim.Claimer, claim, claimer);
}