From dbae16b7a0fbb59d4e7b8999be7ac0f9cb752611 Mon Sep 17 00:00:00 2001 From: atlimit8 Date: Fri, 4 Sep 2015 10:45:58 -0500 Subject: [PATCH] AI counts all aircraft rearm buildings --- OpenRA.Mods.Common/AI/HackyAI.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OpenRA.Mods.Common/AI/HackyAI.cs b/OpenRA.Mods.Common/AI/HackyAI.cs index 7004ef9794..5f478d0845 100644 --- a/OpenRA.Mods.Common/AI/HackyAI.cs +++ b/OpenRA.Mods.Common/AI/HackyAI.cs @@ -421,7 +421,7 @@ namespace OpenRA.Mods.Common.AI if (ammoPoolsInfo.Any(x => !x.SelfReloads)) { var countOwnAir = CountUnits(actorInfo.Name, Player); - var countBuildings = CountBuilding(aircraftInfo.RearmBuildings.FirstOrDefault(), Player); + var countBuildings = aircraftInfo.RearmBuildings.Sum(b => CountBuilding(b, Player)); if (countOwnAir >= countBuildings) return false; }