File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
megamek/src/megamek/common/units Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -2703,7 +2703,10 @@ public boolean isElevationValid(int assumedElevation, Hex hex) {
27032703 int bridgeElev = hex.terrainLevel(Terrains.BRIDGE_ELEV);
27042704 // Entity fits under if: elevation + height + 1 <= bridge elevation
27052705 // (matches VTOL check logic at lines 2599-2602)
2706- if (assumedElevation + height() + 1 > bridgeElev) {
2706+ // don't check this for units that are not actually below the bridge, including units on a height
2707+ // 0 bridge on dry ground (essentially, the bridge being a road)
2708+ // but: don't forget that a height 0 bridge can be over water where this is relevant
2709+ if (assumedElevation < bridgeElev && assumedElevation + height() + 1 > bridgeElev) {
27072710 return false; // Can't fit under bridge, floor is invalid
27082711 }
27092712 }
You can’t perform that action at this time.
0 commit comments