summaryrefslogtreecommitdiff
path: root/src/roadveh_cmd.cpp
diff options
context:
space:
mode:
authormatthijs <matthijs@openttd.org>2007-06-26 20:15:33 +0000
committermatthijs <matthijs@openttd.org>2007-06-26 20:15:33 +0000
commit25f7e8c8a0bcf8face0838252dd97330c895047b (patch)
treeb6cfcef92135e365ce9a55a18ba4f4b7523538e5 /src/roadveh_cmd.cpp
parentf8a5b61f4e4a6304653db240be40c399c1ae46a6 (diff)
downloadopenttd-25f7e8c8a0bcf8face0838252dd97330c895047b.tar.xz
(svn r10345) -Fix [FS#290]: Make OPF handle coming out of a tunnel as well as going into a tunnel, to support road vehicles looking back when finding a depot while in a tunnel.
-Fix [FS#290]: Make NPF look back when finding a depot for road vehicles.
Diffstat (limited to 'src/roadveh_cmd.cpp')
-rw-r--r--src/roadveh_cmd.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/roadveh_cmd.cpp b/src/roadveh_cmd.cpp
index ce219bda6..3ca03686a 100644
--- a/src/roadveh_cmd.cpp
+++ b/src/roadveh_cmd.cpp
@@ -416,7 +416,7 @@ static const Depot* FindClosestRoadDepot(const Vehicle* v)
/* See where we are now */
Trackdir trackdir = GetVehicleTrackdir(v);
- ftd = NPFRouteToDepotBreadthFirst(v->tile, trackdir, TRANSPORT_ROAD, v->u.road.compatible_roadtypes, v->owner, INVALID_RAILTYPE);
+ ftd = NPFRouteToDepotBreadthFirstTwoWay(v->tile, trackdir, v->tile, ReverseTrackdir(trackdir), TRANSPORT_ROAD, v->u.road.compatible_roadtypes, v->owner, INVALID_RAILTYPE, 0);
if (ftd.best_bird_dist == 0) {
return GetDepotByTile(ftd.node.tile); /* Target found */
} else {