Fix warfactory roof glitch

This commit is contained in:
Paul Chote
2011-04-17 20:02:02 +12:00
parent 5adc90a76e
commit a0941db61b
5 changed files with 26 additions and 17 deletions

View File

@@ -30,13 +30,15 @@ namespace OpenRA.Mods.RA
if (order.OrderString == "Sell" && !selling)
{
selling = true;
self.CancelActivity();
if (self.HasTrait<RenderBuilding>() && self.Info.Traits.Get<RenderBuildingInfo>().HasMakeAnimation)
self.QueueActivity(new MakeAnimation(self, true));
foreach( var ns in self.TraitsImplementing<INotifySold>() )
ns.Selling( self );
self.CancelActivity();
var rb = self.TraitOrDefault<RenderBuilding>();
if (rb != null && self.Info.Traits.Get<RenderBuildingInfo>().HasMakeAnimation)
self.QueueActivity(new MakeAnimation(self, true, () => rb.PlayCustomAnim(self, "make")));
self.QueueActivity(new Sell());
}
}