summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/rail_cmd.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/rail_cmd.cpp b/src/rail_cmd.cpp
index c2a7c74c8..f3c290a1b 100644
--- a/src/rail_cmd.cpp
+++ b/src/rail_cmd.cpp
@@ -1417,6 +1417,10 @@ CommandCost CmdConvertRail(TileIndex tile, DoCommandFlag flags, uint32 p1, uint3
break;
case MP_ROAD:
if (!IsLevelCrossing(tile)) continue;
+ if (RailNoLevelCrossings(totype)) {
+ error.MakeError(STR_ERROR_CROSSING_DISALLOWED);
+ continue;
+ }
break;
case MP_TUNNELBRIDGE:
if (GetTunnelBridgeTransportType(tile) != TRANSPORT_RAIL) continue;