From 31f4b0a5c435694f6e590c6848f8d07b92082e6e Mon Sep 17 00:00:00 2001 From: reaperrr Date: Sat, 2 Feb 2019 00:26:17 +0100 Subject: [PATCH] Fix D2k bots wasting cash on building repairs D2k bots not repairing buildings when damaged due to placement without concrete was intentional, and this was bleed's default behavior before BuildingRepairBotModule got introduced, too. --- .../Traits/BotModules/BuildingRepairBotModule.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/OpenRA.Mods.Common/Traits/BotModules/BuildingRepairBotModule.cs b/OpenRA.Mods.Common/Traits/BotModules/BuildingRepairBotModule.cs index 627954bf34..a2350bf27a 100644 --- a/OpenRA.Mods.Common/Traits/BotModules/BuildingRepairBotModule.cs +++ b/OpenRA.Mods.Common/Traits/BotModules/BuildingRepairBotModule.cs @@ -26,6 +26,12 @@ namespace OpenRA.Mods.Common.Traits void IBotRespondToAttack.RespondToAttack(IBot bot, Actor self, AttackInfo e) { + // HACK: We don't want D2k bots to repair all their buildings on placement + // where half their HP is removed via neutral terrain damage. + // TODO: Implement concrete placement for D2k bots and remove this hack. + if (e.Attacker.Owner.Stances[self.Owner] == Stance.Neutral) + return; + var rb = self.TraitOrDefault(); if (rb != null) {