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

@@ -782,6 +782,10 @@ bool IsRailStationBridgeAboveOk(TileIndex tile, const StationSpec *statspec, byt
if (statspec && HasBit(statspec->internal_flags, SSIF_BRIDGE_HEIGHTS_SET)) {
return (GetTileMaxZ(tile) + statspec->bridge_height[layout] <= GetBridgeHeight(GetSouthernBridgeEnd(tile)));
} else if (!statspec) {
// default stations/waypoints
const int height = layout < 4 ? 2 : 5;
return (GetTileMaxZ(tile) + height <= GetBridgeHeight(GetSouthernBridgeEnd(tile)));
} else {
return _settings_game.construction.allow_stations_under_bridges;
}