summaryrefslogtreecommitdiff
path: root/src/road_map.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-02-14 16:37:16 +0000
committerrubidium <rubidium@openttd.org>2007-02-14 16:37:16 +0000
commit0e8f006dc18e8faff93382fe8044d046c36e86f4 (patch)
tree1a15ba2c92fafbb76de3d76a96583953c41b088b /src/road_map.cpp
parent39b73119cabcaa793856b441461fd77e37c491ef (diff)
downloadopenttd-0e8f006dc18e8faff93382fe8044d046c36e86f4.tar.xz
(svn r8735) -Feature: drive-through road stops made possible by the hard work of mart3p.
Diffstat (limited to 'src/road_map.cpp')
-rw-r--r--src/road_map.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/road_map.cpp b/src/road_map.cpp
index ccbf7b614..704d7de3e 100644
--- a/src/road_map.cpp
+++ b/src/road_map.cpp
@@ -24,6 +24,7 @@ RoadBits GetAnyRoadBits(TileIndex tile)
case MP_STATION:
if (!IsRoadStopTile(tile)) return ROAD_NONE;
+ if (IsDriveThroughStopTile(tile)) return (GetRoadStopDir(tile) == DIAGDIR_NE) ? ROAD_X : ROAD_Y;
return DiagDirToRoadBits(GetRoadStopDir(tile));
case MP_TUNNELBRIDGE:
@@ -45,7 +46,7 @@ TrackBits GetAnyRoadTrackBits(TileIndex tile)
uint32 r;
// Don't allow local authorities to build roads through road depots or road stops.
- if ((IsTileType(tile, MP_STREET) && IsTileDepotType(tile, TRANSPORT_ROAD)) || IsTileType(tile, MP_STATION)) {
+ if ((IsTileType(tile, MP_STREET) && IsTileDepotType(tile, TRANSPORT_ROAD)) || (IsTileType(tile, MP_STATION) && !IsDriveThroughStopTile(tile))) {
return TRACK_BIT_NONE;
}