summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-05-31 18:12:35 +0000
committerrubidium <rubidium@openttd.org>2007-05-31 18:12:35 +0000
commit4a62006c395661a7934105d9dcbcb4939c49ab43 (patch)
tree9f5ae168368a85665b543d27467b7956c3e746ae /src
parentb3aa28e879c757e423744f86ed39d35f1964d6d4 (diff)
downloadopenttd-4a62006c395661a7934105d9dcbcb4939c49ab43.tar.xz
(svn r10004) -Fix: trams can always intersect/have junctions on one way roads (because they only work for busses and lorries).
Diffstat (limited to 'src')
-rw-r--r--src/road_cmd.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/road_cmd.cpp b/src/road_cmd.cpp
index 6ab860502..2c752a88e 100644
--- a/src/road_cmd.cpp
+++ b/src/road_cmd.cpp
@@ -375,8 +375,8 @@ int32 CmdBuildRoad(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
existing = GetRoadBits(tile, rt);
RoadBits merged = existing | pieces;
- bool crossing = (merged & ROAD_X) != ROAD_NONE && (merged & ROAD_Y) != ROAD_NONE;
- if (GetDisallowedRoadDirections(tile) != DRD_NONE && crossing) {
+ bool crossing = (merged != ROAD_X && merged != ROAD_Y);
+ if (rt != ROADTYPE_TRAM && (GetDisallowedRoadDirections(tile) != DRD_NONE || toggle_drd != DRD_NONE) && crossing) {
/* Junctions cannot be one-way */
return_cmd_error(STR_ERR_ONEWAY_ROADS_CAN_T_HAVE_JUNCTION);
}