Fix that VTOLs can ignore TurnToDock/-Land
When already at horizontal target position, no Turn was queued.
This commit is contained in:
@@ -130,16 +130,20 @@ namespace OpenRA.Mods.Common.Activities
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Move towards landing location
|
// Move towards landing location/facing
|
||||||
if (aircraft.Info.VTOL && (pos - targetPosition).HorizontalLengthSquared != 0)
|
if (aircraft.Info.VTOL)
|
||||||
|
{
|
||||||
|
if ((pos - targetPosition).HorizontalLengthSquared != 0)
|
||||||
{
|
{
|
||||||
QueueChild(new Fly(self, Target.FromPos(targetPosition)));
|
QueueChild(new Fly(self, Target.FromPos(targetPosition)));
|
||||||
|
|
||||||
if (desiredFacing != -1)
|
|
||||||
QueueChild(new Turn(self, desiredFacing));
|
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
else if (desiredFacing != -1 && desiredFacing != aircraft.Facing)
|
||||||
|
{
|
||||||
|
QueueChild(new Turn(self, desiredFacing));
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!aircraft.Info.VTOL && !finishedApproach)
|
if (!aircraft.Info.VTOL && !finishedApproach)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user