Replace some .Any checks with explicit .Count checks in AI

This commit is contained in:
reaperrr
2017-12-02 04:18:42 +01:00
committed by Paul Chote
parent 3fe808e0fb
commit e6835cef6e
3 changed files with 3 additions and 3 deletions

View File

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