Reduce ICrushable trait lookup & drop -SubCell suffix.

Replace `a.HasTrait<ICrushable>()` with a.TraitsImplementing<ICrushable>().Any() or equivalent.
This commit is contained in:
atlimit8
2014-08-30 04:43:57 -05:00
parent e29b9edfc1
commit 8ad1140921
10 changed files with 74 additions and 75 deletions

View File

@@ -40,7 +40,7 @@ namespace OpenRA.Mods.RA.Activities
.Shuffle(self.World.SharedRandom)
.Select(c => Pair.New(c, pos.GetAvailableSubCell(c)))
.Cast<Pair<CPos, SubCell>?>()
.FirstOrDefault(s => s.Value.Second != SubCell.InvalidSubCell);
.FirstOrDefault(s => s.Value.Second != SubCell.Invalid);
}
IEnumerable<CPos> BlockedExitCells(Actor passenger)