Cancel make animation if the building dies. Fixes #3464.

This commit is contained in:
Paul Chote
2013-06-27 18:07:51 +12:00
parent fc6a38182d
commit 791cdeba4d
2 changed files with 6 additions and 0 deletions

View File

@@ -33,6 +33,9 @@ namespace OpenRA.Mods.RA.Activities
public override Activity Tick( Actor self ) public override Activity Tick( Actor self )
{ {
if (self.IsDead())
return NextActivity;
if (started) if (started)
{ {
// Don't break the actor if someone has overriden the animation prematurely // Don't break the actor if someone has overriden the animation prematurely

View File

@@ -34,6 +34,9 @@ namespace OpenRA.Mods.RA.Activities
self.World.AddFrameEndTask(w => self.World.AddFrameEndTask(w =>
{ {
if (self.IsDead())
return;
foreach (var nt in self.TraitsImplementing<INotifyTransform>()) foreach (var nt in self.TraitsImplementing<INotifyTransform>())
nt.OnTransform(self); nt.OnTransform(self);