changeset 3927:db69d368fa8f draft

(svn r5062) -Fix: town extends road beyond depot or roadstop (introduced by YAPF related change of GetTileTrackStatus() - r4419)
author KUDr <KUDr@openttd.org>
date Wed, 31 May 2006 20:08:55 +0000
parents 9404ad1a66ae
children f5bcda6cdbab
files road_map.c
diffstat 1 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/road_map.c
+++ b/road_map.c
@@ -8,6 +8,7 @@
 #include "station.h"
 #include "tunnel_map.h"
 #include "station_map.h"
+#include "depot.h"
 
 
 RoadBits GetAnyRoadBits(TileIndex tile)
@@ -51,6 +52,9 @@
 
 TrackBits GetAnyRoadTrackBits(TileIndex tile)
 {
-	uint32 r = GetTileTrackStatus(tile, TRANSPORT_ROAD);
-	return (byte)(r | (r >> 8));
+	if (IsTileType(tile, MP_STREET) && !IsTileDepotType(tile, TRANSPORT_ROAD)) {
+		uint32 r = GetTileTrackStatus(tile, TRANSPORT_ROAD);
+		return (byte)(r | (r >> 8));
+	}
+	return 0;
 }