From c304aa50e9f3fb67a0f661edcf9bc69b426ea7b7 Mon Sep 17 00:00:00 2001 From: J0an Josep Date: Fri, 4 Jan 2019 01:41:22 +0100 Subject: Fix: [NPF] Don't look two-way for road vehicles when looking for a depot. Road vehicles shouldn't reverse all of a sudden. --- src/pathfinder/npf/npf.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/pathfinder/npf/npf.cpp b/src/pathfinder/npf/npf.cpp index 71ecf8912..9535ac063 100644 --- a/src/pathfinder/npf/npf.cpp +++ b/src/pathfinder/npf/npf.cpp @@ -1115,7 +1115,7 @@ FindDepotData NPFRoadVehicleFindNearestDepot(const RoadVehicle *v, int max_penal Trackdir trackdir = v->GetVehicleTrackdir(); AyStarUserData user = { v->owner, TRANSPORT_ROAD, INVALID_RAILTYPES, v->compatible_roadtypes }; - NPFFoundTargetData ftd = NPFRouteToDepotBreadthFirstTwoWay(v->tile, trackdir, false, v->tile, ReverseTrackdir(trackdir), false, NULL, &user, 0, max_penalty); + NPFFoundTargetData ftd = NPFRouteToDepotBreadthFirstTwoWay(v->tile, trackdir, false, INVALID_TILE, INVALID_TRACKDIR, false, NULL, &user, 0, max_penalty); if (ftd.best_bird_dist != 0) return FindDepotData(); -- cgit v1.2.3-70-g09d2