From e0fd048f41830e8580e8f485c3bba42b31888b1f Mon Sep 17 00:00:00 2001 From: Mustafa Alperen Seki Date: Wed, 14 Aug 2024 11:59:24 +0300 Subject: [PATCH] Missed two. --- OpenRA.Mods.AS/Traits/SupportPowers/FireArmamentPower.cs | 6 +++--- .../Traits/BotModules/Squads/States/NavyStates.cs | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/OpenRA.Mods.AS/Traits/SupportPowers/FireArmamentPower.cs b/OpenRA.Mods.AS/Traits/SupportPowers/FireArmamentPower.cs index fb1cacd02eb3..af5ccfb39a74 100644 --- a/OpenRA.Mods.AS/Traits/SupportPowers/FireArmamentPower.cs +++ b/OpenRA.Mods.AS/Traits/SupportPowers/FireArmamentPower.cs @@ -290,12 +290,12 @@ protected override IEnumerable 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 }; - } } } diff --git a/OpenRA.Mods.Common/Traits/BotModules/Squads/States/NavyStates.cs b/OpenRA.Mods.Common/Traits/BotModules/Squads/States/NavyStates.cs index 15b641d8f5a2..ed373e5396df 100644 --- a/OpenRA.Mods.Common/Traits/BotModules/Squads/States/NavyStates.cs +++ b/OpenRA.Mods.Common/Traits/BotModules/Squads/States/NavyStates.cs @@ -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())); }