Remove redundant Disposed checks

IsDead returns true if Disposed is true.
This commit is contained in:
reaperrr
2017-07-28 14:18:57 +02:00
committed by abcdefg30
parent 68607872bd
commit 879ab2ac1f
2 changed files with 2 additions and 2 deletions

View File

@@ -95,7 +95,7 @@ namespace OpenRA.Mods.Common.AI
else
{
var enemies = owner.World.FindActorsInCircle(leader.CenterPosition, WDist.FromCells(12))
.Where(a1 => !a1.Disposed && !a1.IsDead);
.Where(a1 => !a1.IsDead);
var enemynearby = enemies.Where(a1 => a1.Info.HasTraitInfo<ITargetableInfo>() && leader.Owner.Stances[a1.Owner] == Stance.Enemy);
var target = enemynearby.ClosestTo(leader.CenterPosition);
if (target != null)

View File

@@ -113,7 +113,7 @@ namespace OpenRA.Mods.Common.Commands
foreach (var actor in world.Selection.Actors)
{
if (actor.IsDead || actor.Disposed)
if (actor.IsDead)
continue;
var leveluporder = new Order("DevLevelUp", actor, false);