summaryrefslogtreecommitdiff
path: root/src/station_cmd.cpp
diff options
context:
space:
mode:
authorPeter Nelson <peter1138@openttd.org>2018-06-03 21:58:34 +0100
committerPeterN <peter@fuzzle.org>2018-06-06 07:20:46 +0100
commit408cee123df526002b7d39949330f938d29fb349 (patch)
tree7088a05e2cf7c9008afce06de495d1e445c4844c /src/station_cmd.cpp
parente7ce4901552fec70520523440cec27722935d3ae (diff)
downloadopenttd-408cee123df526002b7d39949330f938d29fb349.tar.xz
Fix: One-way roads could be over-built by road stops (regardless of road owner.)
Diffstat (limited to 'src/station_cmd.cpp')
-rw-r--r--src/station_cmd.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp
index 07780de13..07db05856 100644
--- a/src/station_cmd.cpp
+++ b/src/station_cmd.cpp
@@ -960,6 +960,8 @@ static CommandCost CheckFlatLandRoadStop(TileArea tile_area, DoCommandFlag flags
num_roadbits += CountBits(GetRoadBits(cur_tile, ROADTYPE_ROAD));
}
+ if (GetDisallowedRoadDirections(cur_tile) != DRD_NONE) return_cmd_error(STR_ERROR_DRIVE_THROUGH_ON_ONEWAY_ROAD);
+
/* There is a tram, check if we can build road+tram stop over it. */
if (HasBit(cur_rts, ROADTYPE_TRAM)) {
Owner tram_owner = GetRoadOwner(cur_tile, ROADTYPE_TRAM);