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/rail_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/rail_cmd.cpp')
-rw-r--r-- | src/rail_cmd.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/rail_cmd.cpp b/src/rail_cmd.cpp index 86eaa5ca2..c61503fe6 100644 --- a/src/rail_cmd.cpp +++ b/src/rail_cmd.cpp @@ -423,6 +423,8 @@ CommandCost CmdBuildSingleRail(TileIndex tile, DoCommandFlag flags, uint32 p1, u if (GetDisallowedRoadDirections(tile) != DRD_NONE) return_cmd_error(STR_ERROR_CROSSING_ON_ONEWAY_ROAD); + if (RailNoLevelCrossings(railtype)) return_cmd_error(STR_ERROR_CROSSING_DISALLOWED); + RoadTypes roadtypes = GetRoadTypes(tile); RoadBits road = GetRoadBits(tile, ROADTYPE_ROAD); RoadBits tram = GetRoadBits(tile, ROADTYPE_TRAM); |