road_map.c
changeset 3154 6ab0cb6b7ab3
parent 3150 729951cb5448
child 3167 8323c2ccd029
--- a/road_map.c	Mon Mar 06 20:28:28 2006 +0000
+++ b/road_map.c	Mon Mar 06 20:55:24 2006 +0000
@@ -5,6 +5,7 @@
 #include "functions.h"
 #include "road_map.h"
 #include "station.h"
+#include "tunnel_map.h"
 
 
 RoadBits GetAnyRoadBits(TileIndex tile)
@@ -36,8 +37,8 @@
 				}
 			} else {
 				// tunnel
-				if (GB(_m[tile].m5, 2, 2) != TRANSPORT_ROAD) return 0; // not a road tunnel
-				return DiagDirToRoadBits(ReverseDiagDir(GB(_m[tile].m5, 0, 2)));
+				if (GetTunnelTransportType(tile) != TRANSPORT_ROAD) return 0;
+				return DiagDirToRoadBits(ReverseDiagDir(GetTunnelDirection(tile)));
 			}
 
 		default: return 0;