summaryrefslogtreecommitdiff
path: root/road_map.c
diff options
context:
space:
mode:
authortron <tron@openttd.org>2006-03-14 12:00:11 +0000
committertron <tron@openttd.org>2006-03-14 12:00:11 +0000
commit42d1731cc1a795f7067c1fd92e337a41480d5589 (patch)
treee2311e3c6295b3d9db10baea067278eaaa657869 /road_map.c
parentb2412f7472335fdaee34b355643f0ab77ae381bd (diff)
downloadopenttd-42d1731cc1a795f7067c1fd92e337a41480d5589.tar.xz
(svn r3857) Add and use GetBridgeRampDirection()
Note: This slightly changes the behavior of GetAnyRoadBits() to only return a road piece for the start of the bridge ramp instead of a full ROAD_[XY]
Diffstat (limited to 'road_map.c')
-rw-r--r--road_map.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/road_map.c b/road_map.c
index 3780334a3..756ab1a92 100644
--- a/road_map.c
+++ b/road_map.c
@@ -2,6 +2,7 @@
#include "stdafx.h"
#include "openttd.h"
+#include "bridge_map.h"
#include "functions.h"
#include "road_map.h"
#include "station.h"
@@ -33,7 +34,7 @@ RoadBits GetAnyRoadBits(TileIndex tile)
} else {
// ending
if (GB(_m[tile].m5, 1, 2) != TRANSPORT_ROAD) return 0; // not a road bridge
- return _m[tile].m5 & 1 ? ROAD_Y : ROAD_X;
+ return DiagDirToRoadBits(ReverseDiagDir(GetBridgeRampDirection(tile)));
}
} else {
// tunnel