(svn r10004) -Fix: trams can always intersect/have junctions on one way roads (because they only work for busses and lorries).
authorrubidium
Thu, 31 May 2007 18:12:35 +0000
changeset 7264 6e0199b059b9
parent 7263 07bec732eaf9
child 7265 74148c363f9d
(svn r10004) -Fix: trams can always intersect/have junctions on one way roads (because they only work for busses and lorries).
src/road_cmd.cpp
--- a/src/road_cmd.cpp	Thu May 31 18:11:39 2007 +0000
+++ b/src/road_cmd.cpp	Thu May 31 18:12:35 2007 +0000
@@ -375,8 +375,8 @@
 
 					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);
 					}