Fix bogus pathability check.

This fixes units on pathable bridge tiles from
being killed on bridge death (they were failing
the check against themselves).
This commit is contained in:
Paul Chote
2013-04-15 01:41:12 +12:00
parent a1313b518d
commit 8676562d47

View File

@@ -109,7 +109,8 @@ namespace OpenRA.Mods.RA.Move
return true;
var blockingActors = world.ActorMap.GetUnitsAt(cell)
.Where(x => x != ignoreActor)
// Don't fail if the unit is already in this cell
.Where(x => x != ignoreActor && x != self)
// Neutral/enemy units are blockers. Allied units that are moving are not blockers.
.Where(x => blockedByMovers || ((self.Owner.Stances[x.Owner] != Stance.Ally) || !IsMovingInMyDirection(self, x)))
.ToList();