Pull the make animation crap out of Transforms

This commit is contained in:
Paul Chote
2011-04-10 10:53:04 +12:00
parent 43f81501a8
commit e4d8680bd5
4 changed files with 78 additions and 41 deletions

View File

@@ -13,6 +13,7 @@ using OpenRA.Mods.RA.Activities;
using OpenRA.Mods.RA.Buildings;
using OpenRA.Mods.RA.Orders;
using OpenRA.Traits;
using OpenRA.Mods.RA.Render;
namespace OpenRA.Mods.RA
{
@@ -79,7 +80,10 @@ namespace OpenRA.Mods.RA
if (self.HasTrait<IFacing>())
self.QueueActivity(new Turn(Info.Facing));
self.QueueActivity(new Transform(self, Info.IntoActor, Info.Offset, Info.Facing, Info.TransformSounds));
if (self.HasTrait<RenderBuilding>() && self.Info.Traits.Get<RenderBuildingInfo>().HasMakeAnimation)
self.QueueActivity(new MakeAnimation(self, true));
self.QueueActivity(new Transform(self, Info.IntoActor) {Offset = Info.Offset, Facing = Info.Facing, Sounds = Info.TransformSounds});
}
}
}