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:
@@ -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 {
|
||||
|
Reference in New Issue
Block a user