summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJ0an Josep <juanjo.ng.83@gmail.com>2019-01-04 01:41:22 +0100
committerNiels Martin Hansen <nielsm@indvikleren.dk>2019-01-06 16:47:45 +0100
commitc304aa50e9f3fb67a0f661edcf9bc69b426ea7b7 (patch)
tree1909ddcaa9f3bd061daccf0f9c87e31ffc0bb482 /src
parent1db66a285e9e887d86dad60e73b00c5a3efc0219 (diff)
downloadopenttd-c304aa50e9f3fb67a0f661edcf9bc69b426ea7b7.tar.xz
Fix: [NPF] Don't look two-way for road vehicles when looking for a depot. Road vehicles shouldn't reverse all of a sudden.
Diffstat (limited to 'src')
-rw-r--r--src/pathfinder/npf/npf.cpp2
1 files changed, 1 insertions, 1 deletions
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();