Skip to content

Commit

Permalink
Fix HeliRTB and Aircraftto consider TurnToLand
Browse files Browse the repository at this point in the history
This was previously ignored when a helicopter/VTOL
was ordered directly or indirectly to ReturnToBase.
  • Loading branch information
reaperrr committed Nov 3, 2018
1 parent 549e525 commit 8f6d17a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion OpenRA.Mods.Common/Activities/Air/HeliReturnToBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,9 @@ public override Activity Tick(Actor self)
{
aircraft.MakeReservation(dest);

landingProcedures.Add(new Turn(self, initialFacing));
if (aircraft.Info.TurnToLand)
landingProcedures.Add(new Turn(self, initialFacing));

landingProcedures.Add(new HeliLand(self, false));
landingProcedures.Add(new ResupplyAircraft(self));
if (!abortOnResupply)
Expand Down
4 changes: 3 additions & 1 deletion OpenRA.Mods.Common/Traits/Air/Aircraft.cs
Original file line number Diff line number Diff line change
Expand Up @@ -752,7 +752,9 @@ public void ResolveOrder(Actor self, Order order)
var offset = exit != null ? exit.Info.SpawnOffset : WVec.Zero;
self.QueueActivity(new HeliFly(self, Target.FromPos(targetActor.CenterPosition + offset)));
self.QueueActivity(new Turn(self, Info.InitialFacing));
if (Info.TurnToLand)
self.QueueActivity(new Turn(self, Info.InitialFacing));
self.QueueActivity(new HeliLand(self, false));
self.QueueActivity(new ResupplyAircraft(self));
};
Expand Down

0 comments on commit 8f6d17a

Please sign in to comment.