From 242d589c45c181193099aa9e211afcadd14b68a0 Mon Sep 17 00:00:00 2001 From: dnqbob Date: Mon, 27 Dec 2021 10:35:55 +0800 Subject: [PATCH] Make AI airstrike aircraft spawns randomly --- OpenRA.Mods.Common/Traits/BotModules/SupportPowerBotModule.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/OpenRA.Mods.Common/Traits/BotModules/SupportPowerBotModule.cs b/OpenRA.Mods.Common/Traits/BotModules/SupportPowerBotModule.cs index 787551e399..849159e30a 100644 --- a/OpenRA.Mods.Common/Traits/BotModules/SupportPowerBotModule.cs +++ b/OpenRA.Mods.Common/Traits/BotModules/SupportPowerBotModule.cs @@ -110,7 +110,9 @@ namespace OpenRA.Mods.Common.Traits // Valid target found, delay by a few ticks to avoid rescanning before power fires via order AIUtils.BotDebug("{0} found new target location {1} for support power {2}.", player.PlayerName, attackLocation, sp.Info.OrderName); waitingPowers[sp] += 10; - bot.QueueOrder(new Order(sp.Key, supportPowerManager.Self, Target.FromCell(world, attackLocation.Value), false) { SuppressVisualFeedback = true }); + + // Note: SelectDirectionalTarget uses uint.MaxValue in ExtraData to indicate that the player did not pick a direction. + bot.QueueOrder(new Order(sp.Key, supportPowerManager.Self, Target.FromCell(world, attackLocation.Value), false) { SuppressVisualFeedback = true, ExtraData = uint.MaxValue }); } }