summaryrefslogtreecommitdiff
path: root/src/pathfinder
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2017-04-03 21:37:01 +0000
committerpeter1138 <peter1138@openttd.org>2017-04-03 21:37:01 +0000
commit39fa3c7cbd000fa078bc5742748fa1c3b66de12b (patch)
tree83a58dcadcd83a68545838945bf9f4c1a51e1061 /src/pathfinder
parent9a7fa689a135caaabeae40ca78963fe96463ac14 (diff)
downloadopenttd-39fa3c7cbd000fa078bc5742748fa1c3b66de12b.tar.xz
(svn r27843) -Change: (Yapf) Consider depot as destination before reversing path and applying penalty.
Diffstat (limited to 'src/pathfinder')
-rw-r--r--src/pathfinder/yapf/yapf_costrail.hpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/pathfinder/yapf/yapf_costrail.hpp b/src/pathfinder/yapf/yapf_costrail.hpp
index 64cf96380..f8047955c 100644
--- a/src/pathfinder/yapf/yapf_costrail.hpp
+++ b/src/pathfinder/yapf/yapf_costrail.hpp
@@ -403,6 +403,8 @@ no_entry_cost: // jump here at the beginning if the node has no parent (it is th
/* Penalty for reversing in a depot. */
assert(IsRailDepot(cur.tile));
segment_cost += Yapf().PfGetSettings().rail_depot_reverse_penalty;
+
+ } else if (IsRailDepotTile(cur.tile)) {
/* We will end in this pass (depot is possible target) */
end_segment_reason |= ESRB_DEPOT;