@@ -747,12 +747,14 @@ static CommandCost DoClearBridge(TileInd
/* checks if the owner is town then decrease town rating by RATING_TUNNEL_BRIDGE_DOWN_STEP until
* you have a "Poor" (0) town rating */
if (IsTileOwner(tile, OWNER_TOWN) && _game_mode != GM_EDITOR) {
ChangeTownRating(t, RATING_TUNNEL_BRIDGE_DOWN_STEP, RATING_TUNNEL_BRIDGE_MINIMUM, flags);
}
Money base_cost = (GetTunnelBridgeTransportType(tile) != TRANSPORT_WATER) ? _price[PR_CLEAR_BRIDGE] : _price[PR_CLEAR_AQUEDUCT];
if (flags & DC_EXEC) {
/* read this value before actual removal of bridge */
bool rail = GetTunnelBridgeTransportType(tile) == TRANSPORT_RAIL;
Owner owner = GetTileOwner(tile);
uint height = GetBridgeHeight(tile);
Train *v = NULL;
@@ -784,13 +786,12 @@ static CommandCost DoClearBridge(TileInd
YapfNotifyTrackLayoutChange(endtile, track);
if (v != NULL) TryPathReserve(v, true);
return CommandCost(EXPENSES_CONSTRUCTION, (GetTunnelBridgeLength(tile, endtile) + 2) * base_cost);
/** Remove a tunnel or a bridge from the game.
* @param tile Tile containing one of the endpoints.
* @param flags Command flags.