diff options
author | michi_cc <michi_cc@openttd.org> | 2010-07-02 16:34:11 +0000 |
---|---|---|
committer | michi_cc <michi_cc@openttd.org> | 2010-07-02 16:34:11 +0000 |
commit | 34f32cbbf47b2cb332b51342c429da93856281d7 (patch) | |
tree | cfeca95505173e09a25326035c3d643de143b587 /src/road_cmd.cpp | |
parent | a75583bbb6d600d51f76edc396279aa0fe6f4c32 (diff) | |
download | openttd-34f32cbbf47b2cb332b51342c429da93856281d7.tar.xz |
(svn r20049) -Feature: [NewGRF] Add a railtype flag to disallow level crossings per railtype.
Diffstat (limited to 'src/road_cmd.cpp')
-rw-r--r-- | src/road_cmd.cpp | 4 |
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: |