AI States style fixes and minor polish

This commit is contained in:
abcdefg30
2017-08-14 11:25:41 +02:00
committed by Paul Chote
parent 98b1468801
commit 4ce2e82ff0
3 changed files with 25 additions and 32 deletions

View File

@@ -34,8 +34,9 @@ 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.Count > 0)
if (buildings.Any())
location = buildings.Random(squad.Random).Location;
return location;
}