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

@@ -33,7 +33,7 @@ namespace OpenRA.Mods.RA.Scripting
public void Paradrop(CPos cell)
{
paradrop.SetLZ(cell, true);
Self.QueueActivity(new Fly(Self, Target.FromCell(Self.World, cell)));
Self.QueueActivity(new Fly(Self, Target.FromCell(Self.World, cell), Self.Trait<Plane>()));
Self.QueueActivity(new FlyOffMap(Self));
Self.QueueActivity(new RemoveSelf());
}

View File

@@ -185,8 +185,9 @@ namespace OpenRA.Mods.RA.Traits
foreach (var p in passengers)
cargo.Load(a, p);
a.QueueActivity(new Fly(a, Target.FromPos(target + spawnOffset)));
a.QueueActivity(new Fly(a, Target.FromPos(finishEdge + spawnOffset)));
var plane = a.Trait<Plane>();
a.QueueActivity(new Fly(a, Target.FromPos(target + spawnOffset), plane));
a.QueueActivity(new Fly(a, Target.FromPos(finishEdge + spawnOffset), plane));
a.QueueActivity(new RemoveSelf());
aircraftInRange.Add(a, false);
distanceTestActor = a;