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

@@ -55,7 +55,7 @@ namespace OpenRA.Mods.Cnc
case State.Dock:
ru.PlayCustomAnimation(self, "dock", () => {
ru.PlayCustomAnimRepeating(self, "dock-loop");
if (proc.IsInWorld && !proc.IsDead())
if (proc.IsInWorld && !proc.IsDead)
foreach (var nd in proc.TraitsImplementing<INotifyDocking>())
nd.Docked(proc, self);
state = State.Loop;
@@ -63,12 +63,12 @@ namespace OpenRA.Mods.Cnc
state = State.Wait;
return this;
case State.Loop:
if (!proc.IsInWorld || proc.IsDead() || harv.TickUnload(self, proc))
if (!proc.IsInWorld || proc.IsDead || harv.TickUnload(self, proc))
state = State.Undock;
return this;
case State.Undock:
ru.PlayCustomAnimBackwards(self, "dock", () => state = State.DragOut);
if (proc.IsInWorld && !proc.IsDead())
if (proc.IsInWorld && !proc.IsDead)
foreach (var nd in proc.TraitsImplementing<INotifyDocking>())
nd.Undocked(proc, self);
state = State.Wait;

View File

@@ -64,7 +64,7 @@ namespace OpenRA.Mods.Cnc.Traits
a.QueueActivity(new Land(Target.FromActor(self)));
a.QueueActivity(new CallFunc(() =>
{
if (!self.IsInWorld || self.IsDead())
if (!self.IsInWorld || self.IsDead)
return;
foreach (var cargo in self.TraitsImplementing<INotifyDelivery>())