diff options
author | rubidium <rubidium@openttd.org> | 2008-06-24 11:42:01 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2008-06-24 11:42:01 +0000 |
commit | 65a4dc890272258cae30db52dcafa115b2979c13 (patch) | |
tree | 775a67badbb216d722ef35e3572bf7199bcfd1fc /src | |
parent | 96d880ea9e91f9c9bdbc2a25918122ad382be97c (diff) | |
download | openttd-65a4dc890272258cae30db52dcafa115b2979c13.tar.xz |
(svn r13621) -Fix: building roadbits in the wrong direction on bridges or building roadbits from underneath the bridge to the bridgehead is impossible, so don't silently ignore that error when building over houses and industries is not ignored.
Diffstat (limited to 'src')
-rw-r--r-- | src/road_cmd.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/road_cmd.cpp b/src/road_cmd.cpp index 9fbf16cc2..28d4e76e0 100644 --- a/src/road_cmd.cpp +++ b/src/road_cmd.cpp @@ -576,6 +576,7 @@ CommandCost CmdBuildRoad(TileIndex tile, uint32 flags, uint32 p1, uint32 p2) case MP_TUNNELBRIDGE: if (GetTunnelBridgeTransportType(tile) != TRANSPORT_ROAD) return CMD_ERROR; + if (MirrorRoadBits(DiagDirToRoadBits(GetTunnelBridgeDirection(tile))) != pieces) return CMD_ERROR; if (HasTileRoadType(tile, rt)) return_cmd_error(STR_1007_ALREADY_BUILT); /* Don't allow adding roadtype to the bridge/tunnel when vehicles are already driving on it */ if (GetVehicleTunnelBridge(tile, GetOtherTunnelBridgeEnd(tile)) != NULL) return CMD_ERROR; @@ -734,6 +735,7 @@ CommandCost CmdBuildLongRoad(TileIndex end_tile, uint32 flags, uint32 p1, uint32 if (tile == end_tile && !HasBit(p2, 1)) bits &= ROAD_NW | ROAD_NE; if (tile == start_tile && HasBit(p2, 0)) bits &= ROAD_SE | ROAD_SW; + _error_message = INVALID_STRING_ID; CommandCost ret = DoCommand(tile, drd << 6 | rt << 4 | bits, 0, flags, CMD_BUILD_ROAD); if (CmdFailed(ret)) { if (_error_message != STR_1007_ALREADY_BUILT) return CMD_ERROR; |