Skip to content

Commit

Permalink
Fix that aircraft with TakeOffOnResupply can't force-land
Browse files Browse the repository at this point in the history
  • Loading branch information
reaperrr authored and abcdefg30 committed Aug 9, 2019
1 parent 969be68 commit 7cfc650
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions OpenRA.Mods.Common/Traits/Air/Aircraft.cs
Expand Up @@ -928,7 +928,7 @@ public IEnumerable<IOrderTargeter> Orders
{
yield return new EnterAlliedActorTargeter<BuildingInfo>("ForceEnter", 6,
(target, modifiers) => Info.CanForceLand && modifiers.HasModifier(TargetModifiers.ForceMove) && AircraftCanEnter(target),
target => Reservable.IsAvailableFor(target, self) && AircraftCanResupplyAt(target, !Info.TakeOffOnResupply));
target => Reservable.IsAvailableFor(target, self) && AircraftCanResupplyAt(target, true));

yield return new EnterAlliedActorTargeter<BuildingInfo>("Enter", 5,
AircraftCanEnter, target => Reservable.IsAvailableFor(target, self) && AircraftCanResupplyAt(target));
Expand Down Expand Up @@ -1019,7 +1019,7 @@ public void ResolveOrder(Actor self, Order order)

var targetActor = order.Target.Actor;
var isForceEnter = orderString == "ForceEnter";
var canResupplyAt = AircraftCanResupplyAt(targetActor, isForceEnter && !Info.TakeOffOnResupply);
var canResupplyAt = AircraftCanResupplyAt(targetActor, isForceEnter || !Info.TakeOffOnResupply);

// This is what the order targeter checks to display the correct cursor, so we need to make sure
// the behavior matches the cursor if the player clicks despite a "blocked" cursor.
Expand Down

0 comments on commit 7cfc650

Please sign in to comment.