Fix #225 and some other uses of a.IsInWorld / a.IsDead()

This commit is contained in:
Paul Chote
2010-10-08 10:28:09 +13:00
parent ad6481c8e8
commit fd34f2ba99
8 changed files with 20 additions and 9 deletions

View File

@@ -61,7 +61,7 @@ namespace OpenRA.Mods.RA
return inRange
.Where(a => a != self && self.Owner.Stances[a.Owner] == Stance.Ally)
.Where(a => !a.IsDead())
.Where(a => a.IsInWorld && !a.IsDead())
.Where(a => a.HasTrait<Health>() && a.GetDamageState() > DamageState.Undamaged)
.Where(a => attack.HasAnyValidWeapons(Target.FromActor(a)))
.OrderBy(a => (a.Location - self.Location).LengthSquared)