diff options
author | planetmaker <planetmaker@openttd.org> | 2013-01-08 17:56:43 +0000 |
---|---|---|
committer | planetmaker <planetmaker@openttd.org> | 2013-01-08 17:56:43 +0000 |
commit | 812346cad9d11ecc552ee8f219428d785537b56b (patch) | |
tree | 0eb3ee48ce3e1d62bc81e85d19b0a707467d979e /src | |
parent | f8e0b22974c4bb7376ea6c6029df92e889807a2a (diff) | |
download | openttd-812346cad9d11ecc552ee8f219428d785537b56b.tar.xz |
(svn r24895) -Fix [FS#5436]: Allow downgrade of road bridges in the scenario editor
Diffstat (limited to 'src')
-rw-r--r-- | src/tunnelbridge_cmd.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/tunnelbridge_cmd.cpp b/src/tunnelbridge_cmd.cpp index 3a53bb8c2..cb9063c6e 100644 --- a/src/tunnelbridge_cmd.cpp +++ b/src/tunnelbridge_cmd.cpp @@ -305,9 +305,10 @@ CommandCost CmdBuildBridge(TileIndex end_tile, DoCommandFlag flags, uint32 p1, u return_cmd_error(STR_ERROR_MUST_DEMOLISH_BRIDGE_FIRST); } - /* Do not replace town bridges with lower speed bridges. */ + /* Do not replace town bridges with lower speed bridges, unless in scenario editor. */ if (!(flags & DC_QUERY_COST) && IsTileOwner(tile_start, OWNER_TOWN) && - GetBridgeSpec(bridge_type)->speed < GetBridgeSpec(GetBridgeType(tile_start))->speed) { + GetBridgeSpec(bridge_type)->speed < GetBridgeSpec(GetBridgeType(tile_start))->speed && + _game_mode != GM_EDITOR) { Town *t = ClosestTownFromTile(tile_start, UINT_MAX); if (t == NULL) { |