Replace some .Any checks with explicit .Count checks in AI
This commit is contained in:
@@ -32,7 +32,7 @@ namespace OpenRA.Mods.Common.AI
|
||||
var location = squad.Bot.GetRandomBaseCenter();
|
||||
var buildings = squad.World.ActorsHavingTrait<Building>()
|
||||
.Where(a => a.Owner == squad.Bot.Player).ToList();
|
||||
if (buildings.Any())
|
||||
if (buildings.Count > 0)
|
||||
location = buildings.Random(squad.Random).Location;
|
||||
|
||||
return location;
|
||||
|
||||
Reference in New Issue
Block a user