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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user