Change Squad.IsEmpty -> IsValid.

This commit is contained in:
Paul Chote
2013-08-24 10:29:00 +12:00
parent fd311502f5
commit 233ba81976
6 changed files with 28 additions and 18 deletions

View File

@@ -28,7 +28,9 @@ namespace OpenRA.Mods.RA.AI
protected virtual bool MayBeFlee(Squad owner, Func<List<Actor>, bool> flee)
{
if (owner.IsEmpty) return false;
if (!owner.IsValid)
return false;
var u = owner.units.Random(owner.random);
var units = owner.world.FindActorsInCircle(u.CenterPosition, WRange.FromCells(dangerRadius)).ToList();