summaryrefslogtreecommitdiff
path: root/src/rail_cmd.cpp
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2008-03-03 19:15:53 +0000
committerpeter1138 <peter1138@openttd.org>2008-03-03 19:15:53 +0000
commit5049fbb08145c0b9cd20436b2f53c3395af78cdb (patch)
treed1aa30b11819536c643ae7d6e264c60d15d2babb /src/rail_cmd.cpp
parent56ed79e44841609130b8b1839e71552b95f2a2cc (diff)
downloadopenttd-5049fbb08145c0b9cd20436b2f53c3395af78cdb.tar.xz
(svn r12329) -Fix [FS#1819]: Disallow building level crossings over one-way roads as this allowed competitors to remove the one-way state.
Diffstat (limited to 'src/rail_cmd.cpp')
-rw-r--r--src/rail_cmd.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/rail_cmd.cpp b/src/rail_cmd.cpp
index b22d2569a..dd2a53976 100644
--- a/src/rail_cmd.cpp
+++ b/src/rail_cmd.cpp
@@ -360,6 +360,8 @@ CommandCost CmdBuildSingleRail(TileIndex tile, uint32 flags, uint32 p1, uint32 p
if (IsNormalRoad(tile)) {
if (HasRoadWorks(tile)) return_cmd_error(STR_ROAD_WORKS_IN_PROGRESS);
+ if (GetDisallowedRoadDirections(tile) != DRD_NONE) return_cmd_error(STR_ERR_CROSSING_ON_ONEWAY_ROAD);
+
RoadTypes roadtypes = GetRoadTypes(tile);
RoadBits road = GetRoadBits(tile, ROADTYPE_ROAD);
RoadBits tram = GetRoadBits(tile, ROADTYPE_TRAM);