Fix #225 and some other uses of a.IsInWorld / a.IsDead()

This commit is contained in:
Paul Chote
2010-10-08 10:28:09 +13:00
parent ad6481c8e8
commit fd34f2ba99
8 changed files with 20 additions and 9 deletions

View File

@@ -55,8 +55,9 @@ namespace OpenRA.Mods.Cnc
a.QueueActivity(new Land(Target.FromActor(self)));
a.QueueActivity(new CallFunc(() =>
{
if (self.IsDead())
if (!self.IsInWorld || self.IsDead())
return;
rb.PlayCustomAnimRepeating(self, "idle");
self.World.AddFrameEndTask(ww => DoProduction(self, producee, exit));
}));