summaryrefslogtreecommitdiff
path: root/npf.c
diff options
context:
space:
mode:
authortron <tron@openttd.org>2006-03-11 09:10:46 +0000
committertron <tron@openttd.org>2006-03-11 09:10:46 +0000
commit929fae7b685a21e2337736084e42731f84cf8cba (patch)
tree5a49ef225f58c5e3ddaaa72935a0c65e716fe884 /npf.c
parent6892e04d14a78818c6cdbf71b0d1f92996a10bc6 (diff)
downloadopenttd-929fae7b685a21e2337736084e42731f84cf8cba.tar.xz
(svn r3816) Use existing accessors
Diffstat (limited to 'npf.c')
-rw-r--r--npf.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/npf.c b/npf.c
index 18818f679..1e6fcf95a 100644
--- a/npf.c
+++ b/npf.c
@@ -508,7 +508,6 @@ static void NPFFollowTrack(AyStar* aystar, OpenListNode* current)
Trackdir src_trackdir = (Trackdir)current->path.node.direction;
TileIndex src_tile = current->path.node.tile;
DiagDirection src_exitdir = TrackdirToExitdir(src_trackdir);
- FindLengthOfTunnelResult flotr;
TileIndex dst_tile;
int i;
TrackdirBits trackdirbits, ts;
@@ -524,8 +523,7 @@ static void NPFFollowTrack(AyStar* aystar, OpenListNode* current)
/* This is a tunnel. We know this tunnel is our type,
* otherwise we wouldn't have got here. It is also facing us,
* so we should skip it's body */
- flotr = FindLengthOfTunnel(src_tile, src_exitdir);
- dst_tile = flotr.tile;
+ dst_tile = GetOtherTunnelEnd(src_tile);
} else {
if (type != TRANSPORT_WATER && (IsRoadStationTile(src_tile) || IsTileDepotType(src_tile, type))){
/* This is a road station or a train or road depot. We can enter and exit