Include tunnel check in CanStayInCell.

This commit is contained in:
tovl
2019-10-01 20:38:48 +02:00
committed by Paul Chote
parent 196d9670d3
commit 2094142b7d
2 changed files with 4 additions and 3 deletions

View File

@@ -109,6 +109,9 @@ namespace OpenRA.Mods.Common.Traits
locomotor = world.WorldActor.TraitsImplementing<Locomotor>()
.SingleOrDefault(l => l.Info.Name == Locomotor);
if (cell.Layer == CustomMovementLayerType.Tunnel)
return false;
return locomotor.CanStayInCell(cell);
}