(svn r26879) -Codechange: remove most MayHaveBridgeAbove calls since the data is now always accessible
This commit is contained in:
@@ -1015,7 +1015,7 @@ CommandCost CmdBuildRoadDepot(TileIndex tile, DoCommandFlag flags, uint32 p1, ui
|
||||
CommandCost cost = DoCommand(tile, 0, 0, flags, CMD_LANDSCAPE_CLEAR);
|
||||
if (cost.Failed()) return cost;
|
||||
|
||||
if (MayHaveBridgeAbove(tile) && IsBridgeAbove(tile)) return_cmd_error(STR_ERROR_MUST_DEMOLISH_BRIDGE_FIRST);
|
||||
if (IsBridgeAbove(tile)) return_cmd_error(STR_ERROR_MUST_DEMOLISH_BRIDGE_FIRST);
|
||||
|
||||
if (!Depot::CanAllocateItem()) return CMD_ERROR;
|
||||
|
||||
@@ -1185,7 +1185,7 @@ void DrawTramCatenary(const TileInfo *ti, RoadBits tram)
|
||||
if (IsInvisibilitySet(TO_CATENARY)) return;
|
||||
|
||||
/* Don't draw the catenary under a low bridge */
|
||||
if (MayHaveBridgeAbove(ti->tile) && IsBridgeAbove(ti->tile) && !IsTransparencySet(TO_CATENARY)) {
|
||||
if (IsBridgeAbove(ti->tile) && !IsTransparencySet(TO_CATENARY)) {
|
||||
int height = GetBridgeHeight(GetNorthernBridgeEnd(ti->tile));
|
||||
|
||||
if (height <= GetTileMaxZ(ti->tile) + 1) return;
|
||||
@@ -1292,7 +1292,7 @@ static void DrawRoadBits(TileInfo *ti)
|
||||
if (!HasBit(_display_opt, DO_FULL_DETAIL) || _cur_dpi->zoom > ZOOM_LVL_DETAIL) return;
|
||||
|
||||
/* Do not draw details (street lights, trees) under low bridge */
|
||||
if (MayHaveBridgeAbove(ti->tile) && IsBridgeAbove(ti->tile) && (roadside == ROADSIDE_TREES || roadside == ROADSIDE_STREET_LIGHTS)) {
|
||||
if (IsBridgeAbove(ti->tile) && (roadside == ROADSIDE_TREES || roadside == ROADSIDE_STREET_LIGHTS)) {
|
||||
int height = GetBridgeHeight(GetNorthernBridgeEnd(ti->tile));
|
||||
int minz = GetTileMaxZ(ti->tile) + 2;
|
||||
|
||||
|
Reference in New Issue
Block a user