Old revision #p9fb2bmxh | New revision #p6scznosn | ||
---|---|---|---|
10 | #include "cmd_helper.h" | 10 | #include "cmd_helper.h" |
11 | #include "viewport_func.h" | 11 | #include "viewport_func.h" |
12 | #include "command_func.h" | 12 | #include "command_func.h" |
13 | @@ -2500,8 +2501,1 | 13 | @@ -2500,8 +2501,14 @@ |
14 | if (ret.Failed()) return ret; | 14 | if (ret.Failed()) return ret; |
15 | 15 | ||
16 | tile_cur += TileOffsByDiagDir(direction); | 16 | tile_cur += TileOffsByDiagDir(direction); |
17 | - if (!IsTileType(tile_cur, MP_WATER) || !IsTileFlat(tile_cur)) { | 17 | - if (!IsTileType(tile_cur, MP_WATER) || !IsTileFlat(tile_cur)) { |
18 | + if (IsTileType(tile_cur, MP_TUNNELBRIDGE) && GetTunnelBridgeTransportType(tile_cur) != TRANSPORT_WATER) { | 18 | - return_cmd_error(STR_ERROR_SITE_UNSUITABLE); |
19 | return_cmd_error(STR_ERROR_SITE_UNSUITABLE); | 19 | + if (IsTileType(tile_cur, MP_TUNNELBRIDGE)) { |
20 | + if (GetTunnelBridgeTransportType(tile_cur) != TRANSPORT_WATER) { | ||
21 | + return_cmd_error(STR_ERROR_SITE_UNSUITABLE); | ||
22 | + } | ||
20 | + } else { | 23 | + } else { |
21 | + if (!IsTileType(tile_cur, MP_WATER) && !IsBuoyTile(tile_cur) || !IsTileFlat(tile_cur) && !IsSlopeWithOneCornerRaised(GetTileSlope(tile_cur))) { | 24 | + if (!IsTileType(tile_cur, MP_WATER) && !IsBuoyTile(tile_cur) || !IsTileFlat(tile_cur) && !IsSlopeWithOneCornerRaised(GetTileSlope(tile_cur))) { |
22 | + return_cmd_error(STR_ERROR_SITE_UNSUITABLE); | 25 | + return_cmd_error(STR_ERROR_SITE_UNSUITABLE); | … | … |
24 | } | 27 | } |
25 | 28 | ||
26 | TileArea dock_area = TileArea(tile + ToTileIndexDiff(_dock_tileoffs_chkaround[direction]), | 29 | TileArea dock_area = TileArea(tile + ToTileIndexDiff(_dock_tileoffs_chkaround[direction]), |
27 | |||
28 | |||
29 | |||
30 | |||
31 | |||
32 | |||
33 | |||
34 | |||
35 | |||
36 | |||
37 | |||
38 | |||
39 | |||
40 | Index: src/waypoint_cmd.cpp | 30 | Index: src/waypoint_cmd.cpp |
41 | =================================================================== | 31 | =================================================================== |
42 | --- src/waypoint_cmd.cpp (revision 27653) | 32 | --- src/waypoint_cmd.cpp (revision 27653) |