summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2012-07-18 19:24:13 +0000
committerfrosch <frosch@openttd.org>2012-07-18 19:24:13 +0000
commit25203976f0605eef25ae0ac9b9a594b951957be2 (patch)
tree60dc2d292d71cd221c05e572c2e79b1134924efc /src
parentf645c15586474396ccba35338102e233a43215f0 (diff)
downloadopenttd-25203976f0605eef25ae0ac9b9a594b951957be2.tar.xz
(svn r24413) -Add [FS#5221-ish]: Allow overbuilding bridges with the same type when adding a roadtype.
Diffstat (limited to 'src')
-rw-r--r--src/tunnelbridge_cmd.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tunnelbridge_cmd.cpp b/src/tunnelbridge_cmd.cpp
index 1fd812134..3a53bb8c2 100644
--- a/src/tunnelbridge_cmd.cpp
+++ b/src/tunnelbridge_cmd.cpp
@@ -319,7 +319,7 @@ CommandCost CmdBuildBridge(TileIndex end_tile, DoCommandFlag flags, uint32 p1, u
}
/* Do not replace the bridge with the same bridge type. */
- if (!(flags & DC_QUERY_COST) && bridge_type == GetBridgeType(tile_start)) {
+ if (!(flags & DC_QUERY_COST) && (bridge_type == GetBridgeType(tile_start)) && (transport_type != TRANSPORT_ROAD || (roadtypes & ~GetRoadTypes(tile_start)) == 0)) {
return_cmd_error(STR_ERROR_ALREADY_BUILT);
}