Mercurial > hg > openttd
changeset 19963:fff9137c7294 draft
(svn r24895) -Fix [FS#5436]: Allow downgrade of road bridges in the scenario editor
author | planetmaker <planetmaker@openttd.org> |
---|---|
date | Tue, 08 Jan 2013 17:56:43 +0000 |
parents | 9be466605769 |
children | 82997aa0c7d9 |
files | src/tunnelbridge_cmd.cpp |
diffstat | 1 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/tunnelbridge_cmd.cpp +++ b/src/tunnelbridge_cmd.cpp @@ -305,9 +305,10 @@ 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) {