Set minimum bridge height clearances for default stations

This commit is contained in:
Jonathan G Rennison
2018-11-14 00:04:29 +00:00
parent 2c88645bac
commit beaddc8a98
2 changed files with 8 additions and 0 deletions

View File

@@ -502,6 +502,10 @@ CommandCost CmdBuildBridge(TileIndex end_tile, DoCommandFlag flags, uint32 p1, u
uint layout = GetStationGfx (tile);
assert(layout < 8);
if (GetTileMaxZ(tile) + statspec->bridge_height[layout] > z_start + 1) goto not_valid_below;
} else if (!statspec) {
// default stations/waypoints
const int height = GetStationGfx(tile) < 4 ? 2 : 5;
if (GetTileMaxZ(tile) + height > z_start + 1) goto not_valid_below;
} else if (!_settings_game.construction.allow_stations_under_bridges) {
goto not_valid_below;
}