Expose Plane turn-to-attack delay to yaml.

Require Plane in some ctors.
This commit is contained in:
Taryn Hill
2015-04-01 00:12:20 -05:00
parent c0c7ad1035
commit 02da41e5c5
13 changed files with 60 additions and 45 deletions

View File

@@ -66,7 +66,8 @@ namespace OpenRA.Mods.Cnc.Traits
new FacingInit(64)
});
actor.QueueActivity(new Fly(actor, Target.FromCell(w, self.Location + new CVec(9, 0))));
var plane = actor.Trait<Plane>();
actor.QueueActivity(new Fly(actor, Target.FromCell(w, self.Location + new CVec(9, 0)), plane));
actor.QueueActivity(new Land(actor, Target.FromActor(self)));
actor.QueueActivity(new CallFunc(() =>
{
@@ -80,7 +81,7 @@ namespace OpenRA.Mods.Cnc.Traits
Sound.PlayNotification(self.World.Map.Rules, self.Owner, "Speech", info.ReadyAudio, self.Owner.Country.Race);
}));
actor.QueueActivity(new Fly(actor, Target.FromCell(w, endPos)));
actor.QueueActivity(new Fly(actor, Target.FromCell(w, endPos), plane));
actor.QueueActivity(new RemoveSelf());
});