diff options
author | rubidium <rubidium@openttd.org> | 2010-08-28 19:02:21 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2010-08-28 19:02:21 +0000 |
commit | 41a80490befda13df13115f3e272d05247bcf4a2 (patch) | |
tree | 1e3f9b83d4291b273b4ba04606837a956845a969 /src/station_cmd.cpp | |
parent | 3e67b4fe5fd94d181e44d8291d389868cd86182b (diff) | |
download | openttd-41a80490befda13df13115f3e272d05247bcf4a2.tar.xz |
(svn r20668) -Codechange: add (more) support for bridges over objects
Diffstat (limited to 'src/station_cmd.cpp')
-rw-r--r-- | src/station_cmd.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp index 9ef27c6f7..f6cba01bb 100644 --- a/src/station_cmd.cpp +++ b/src/station_cmd.cpp @@ -667,11 +667,12 @@ CommandCost ClearTile_Station(TileIndex tile, DoCommandFlag flags); * @param tile TileIndex to check. * @param invalid_dirs Prohibited directions for slopes (set of #DiagDirection). * @param allowed_z Height allowed for the tile. If allowed_z is negative, it will be set to the height of this tile. + * @param check_bridge Check for the existance of a bridge. * @return The cost in case of success, or an error code if it failed. */ -CommandCost CheckBuildableTile(TileIndex tile, uint invalid_dirs, int &allowed_z) +CommandCost CheckBuildableTile(TileIndex tile, uint invalid_dirs, int &allowed_z, bool check_bridge = true) { - if (MayHaveBridgeAbove(tile) && IsBridgeAbove(tile)) { + if (check_bridge && MayHaveBridgeAbove(tile) && IsBridgeAbove(tile)) { return_cmd_error(STR_ERROR_MUST_DEMOLISH_BRIDGE_FIRST); } |