summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKUDr <kudr@openttd.org>2006-05-31 20:08:55 +0000
committerKUDr <kudr@openttd.org>2006-05-31 20:08:55 +0000
commitf8982917ea8bd4cb2419cc423c1293bb341c92f9 (patch)
treef5336db90b79a22987d72c0f2dc17a019992fb9c
parent76b29862c05f0c0cb118b72c80e6e8c8ceb084cf (diff)
downloadopenttd-f8982917ea8bd4cb2419cc423c1293bb341c92f9.tar.xz
(svn r5062) -Fix: town extends road beyond depot or roadstop (introduced by YAPF related change of GetTileTrackStatus() - r4419)
-rw-r--r--road_map.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/road_map.c b/road_map.c
index 2ae989280..8702f7692 100644
--- 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 @@ RoadBits GetAnyRoadBits(TileIndex tile)
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;
}