1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-09-02 03:19:10 +00:00

(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.
This commit is contained in:
matthijs
2007-06-26 20:15:33 +00:00
parent a6da8c9519
commit a0a9a7f3cd
2 changed files with 12 additions and 4 deletions

View File

@@ -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 {