From 41a80490befda13df13115f3e272d05247bcf4a2 Mon Sep 17 00:00:00 2001 From: rubidium Date: Sat, 28 Aug 2010 19:02:21 +0000 Subject: (svn r20668) -Codechange: add (more) support for bridges over objects --- src/station_cmd.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/station_cmd.cpp') 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); } -- cgit v1.2.3-54-g00ecf