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.
This commit is contained in:
committed by
Oliver Brakmann
parent
f8991470da
commit
31f4b0a5c4
@@ -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<RepairableBuilding>();
|
||||
if (rb != null)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user