summaryrefslogtreecommitdiff
path: root/src/road_cmd.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/road_cmd.cpp')
-rw-r--r--src/road_cmd.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/road_cmd.cpp b/src/road_cmd.cpp
index 772887e90..515237f38 100644
--- a/src/road_cmd.cpp
+++ b/src/road_cmd.cpp
@@ -546,6 +546,10 @@ CommandCost CmdBuildRoad(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32
if (GetRailTileType(tile) != RAIL_TILE_NORMAL) goto do_clear;
+ if (RailNoLevelCrossings(GetRailType(tile))) {
+ return_cmd_error(STR_ERROR_CROSSING_DISALLOWED);
+ }
+
Axis roaddir;
switch (GetTrackBits(tile)) {
case TRACK_BIT_X: