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

@@ -80,8 +80,9 @@ namespace OpenRA.Mods.RA
if (self.HasTrait<IFacing>())
self.QueueActivity(new Turn(Info.Facing));
if (self.HasTrait<RenderBuilding>() && self.Info.Traits.Get<RenderBuildingInfo>().HasMakeAnimation)
self.QueueActivity(new MakeAnimation(self, true));
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 Transform(self, Info.IntoActor) {Offset = Info.Offset, Facing = Info.Facing, Sounds = Info.TransformSounds});
}