Revert "Expose Plane turn-to-attack delay to yaml."

This reverts commit 02da41e5c5.
This commit is contained in:
Oliver Brakmann
2015-04-03 23:42:35 +02:00
parent a8d7140c1a
commit 32ed63727d
13 changed files with 45 additions and 60 deletions

View File

@@ -21,16 +21,13 @@ namespace OpenRA.Mods.Common.Activities
{
readonly Target target;
readonly AttackPlane attackPlane;
readonly Plane plane;
readonly IEnumerable<AmmoPool> ammoPools;
Activity inner;
int ticksUntilTurn;
int ticksUntilTurn = 50;
public FlyAttack(Actor self, Target target, Plane plane)
public FlyAttack(Actor self, Target target)
{
this.target = target;
this.plane = plane;
ticksUntilTurn = plane.Info.AttackTurnDelay;
attackPlane = self.TraitOrDefault<AttackPlane>();
ammoPools = self.TraitsImplementing<AmmoPool>();
}
@@ -55,9 +52,9 @@ namespace OpenRA.Mods.Common.Activities
// TODO: This should fire each weapon at its maximum range
if (target.IsInRange(self.CenterPosition, attackPlane.Armaments.Select(a => a.Weapon.MinRange).Min()))
inner = Util.SequenceActivities(new FlyTimed(ticksUntilTurn, self), new Fly(self, target, plane), new FlyTimed(ticksUntilTurn, self));
inner = Util.SequenceActivities(new FlyTimed(ticksUntilTurn, self), new Fly(self, target), new FlyTimed(ticksUntilTurn, self));
else
inner = Util.SequenceActivities(new Fly(self, target, plane), new FlyTimed(ticksUntilTurn, self));
inner = Util.SequenceActivities(new Fly(self, target), new FlyTimed(ticksUntilTurn, self));
}
inner = Util.RunActivity(self, inner);