Skip to content

Commit

Permalink
Missed two.
Browse files Browse the repository at this point in the history
  • Loading branch information
MustaphaTR committed Aug 14, 2024
1 parent f076b5c commit e0fd048
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions OpenRA.Mods.AS/Traits/SupportPowers/FireArmamentPower.cs
Original file line number Diff line number Diff line change
Expand Up @@ -290,12 +290,12 @@ protected override IEnumerable<Order> OrderInner(World world, CPos xy, int2 worl

var actors = instances.Where(x => !x.Item1.IsTraitPaused && !x.Item1.IsTraitDisabled
&& (x.Item1.Self.CenterPosition - pos).HorizontalLengthSquared < x.Item3.LengthSquared)
.OrderBy(x => (x.Item1.Self.CenterPosition - pos).HorizontalLengthSquared).Select(x => x.Item1.Self).Take(power.FireArmamentPowerInfo.MaximumFiringInstances);
.OrderBy(x => (x.Item1.Self.CenterPosition - pos).HorizontalLengthSquared)
.Select(x => x.Item1.Self)
.Take(power.FireArmamentPowerInfo.MaximumFiringInstances);

foreach (var a in actors)
{
yield return new Order(order, a, Target.FromCell(world, xy), false) { SuppressVisualFeedback = true };
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,8 @@ public void Tick(Squad owner)
else
owner.Bot.QueueOrder(new Order("AttackMove", leader.Actor, Target.FromCell(owner.World, owner.TargetActor.Location), false));

var unitsHurryUp = owner.Units.Where(u => (u.Actor.CenterPosition - leader.Actor.CenterPosition).HorizontalLengthSquared >= occupiedArea * 2).Select(u => u.Actor);
var unitsHurryUp = owner.Units.Where(u => (u.Actor.CenterPosition - leader.Actor.CenterPosition).HorizontalLengthSquared >= occupiedArea * 2)
.Select(u => u.Actor);
owner.Bot.QueueOrder(new Order("AttackMove", null, Target.FromCell(owner.World, leader.Actor.Location), false, groupedActors: unitsHurryUp.ToArray()));
}

Expand Down

0 comments on commit e0fd048

Please sign in to comment.