Refactor TakeOff

- Make it self-contained by moving actual take-off
  from 'Fly' to this
- Make 'moveToRallyPoint' a simple boolean
- Make AttackMove to rally point a child activity
- Make TakeOff uninterruptible
This commit is contained in:
reaperrr
2019-05-23 18:45:37 +02:00
committed by Paul Chote
parent 4f8f8cfb9d
commit ce3d7c98ad
4 changed files with 74 additions and 48 deletions

View File

@@ -795,13 +795,7 @@ namespace OpenRA.Mods.Common.Traits
public Activity MoveToTarget(Actor self, Target target,
WPos? initialTargetPosition = null, Color? targetLineColor = null)
{
if (!Info.CanHover)
return new Fly(self, target, WDist.FromCells(3), WDist.FromCells(5),
initialTargetPosition, targetLineColor);
return ActivityUtils.SequenceActivities(self,
new Fly(self, target, initialTargetPosition, targetLineColor),
new Turn(self, Info.InitialFacing));
return new Fly(self, target, initialTargetPosition, targetLineColor);
}
public Activity MoveIntoTarget(Actor self, Target target)