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.
This commit is contained in:
reaperrr
2017-09-15 17:05:45 +02:00
committed by Paul Chote
parent dbcfb0c92e
commit 08aaa998aa

View File

@@ -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)