mirror of https://github.com/OpenTTD/OpenTTD.git
(svn r10004) -Fix: trams can always intersect/have junctions on one way roads (because they only work for busses and lorries).
This commit is contained in:
parent
b2cd8f3631
commit
01f80cf343
|
@ -375,8 +375,8 @@ int32 CmdBuildRoad(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
|
||||||
|
|
||||||
existing = GetRoadBits(tile, rt);
|
existing = GetRoadBits(tile, rt);
|
||||||
RoadBits merged = existing | pieces;
|
RoadBits merged = existing | pieces;
|
||||||
bool crossing = (merged & ROAD_X) != ROAD_NONE && (merged & ROAD_Y) != ROAD_NONE;
|
bool crossing = (merged != ROAD_X && merged != ROAD_Y);
|
||||||
if (GetDisallowedRoadDirections(tile) != DRD_NONE && crossing) {
|
if (rt != ROADTYPE_TRAM && (GetDisallowedRoadDirections(tile) != DRD_NONE || toggle_drd != DRD_NONE) && crossing) {
|
||||||
/* Junctions cannot be one-way */
|
/* Junctions cannot be one-way */
|
||||||
return_cmd_error(STR_ERR_ONEWAY_ROADS_CAN_T_HAVE_JUNCTION);
|
return_cmd_error(STR_ERR_ONEWAY_ROADS_CAN_T_HAVE_JUNCTION);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue