From 08aaa998aace434b94138f19d2bd8071b09a164f Mon Sep 17 00:00:00 2001 From: reaperrr Date: Fri, 15 Sep 2017 17:05:45 +0200 Subject: [PATCH] Fix AI BuildingLimits The AI BaseBuilder would allow building a structure not only when the current number was lower, but also of it was equal to the limit, which allowed the AI to build one too much of every building. --- OpenRA.Mods.Common/AI/BaseBuilder.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OpenRA.Mods.Common/AI/BaseBuilder.cs b/OpenRA.Mods.Common/AI/BaseBuilder.cs index 8d1118e92a..5c98d1e8b0 100644 --- a/OpenRA.Mods.Common/AI/BaseBuilder.cs +++ b/OpenRA.Mods.Common/AI/BaseBuilder.cs @@ -183,7 +183,7 @@ namespace OpenRA.Mods.Common.AI if (!ai.Info.BuildingLimits.ContainsKey(actor.Name)) return true; - return playerBuildings.Count(a => a.Info.Name == actor.Name) <= ai.Info.BuildingLimits[actor.Name]; + return playerBuildings.Count(a => a.Info.Name == actor.Name) < ai.Info.BuildingLimits[actor.Name]; }); if (orderBy != null)