summaryrefslogtreecommitdiff
path: root/src/pathfinder/yapf/yapf_costrail.hpp
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2017-06-22 16:57:06 +0000
committerfrosch <frosch@openttd.org>2017-06-22 16:57:06 +0000
commit35d8c371020bf5886c877bb9cc4d2840702fc2be (patch)
treefef62ceeec4673dd7308eba4ee735801d8370920 /src/pathfinder/yapf/yapf_costrail.hpp
parent80d10598c1cc4e071651f7d3c3611bed5156ef2f (diff)
downloadopenttd-35d8c371020bf5886c877bb9cc4d2840702fc2be.tar.xz
(svn r27885) -Cleanup (r27844): ESR_MAX_COST_EXCEEDED and ESR_PATH_TOO_LONG meant the same thing, but only one was used. Keep PATH_TOO_LONG since it has the better documentation.
Diffstat (limited to 'src/pathfinder/yapf/yapf_costrail.hpp')
-rw-r--r--src/pathfinder/yapf/yapf_costrail.hpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pathfinder/yapf/yapf_costrail.hpp b/src/pathfinder/yapf/yapf_costrail.hpp
index 22103987a..ca317f09a 100644
--- a/src/pathfinder/yapf/yapf_costrail.hpp
+++ b/src/pathfinder/yapf/yapf_costrail.hpp
@@ -486,7 +486,7 @@ no_entry_cost: // jump here at the beginning if the node has no parent (it is th
/* Finish if we already exceeded the maximum path cost (i.e. when
* searching for the nearest depot). */
if (m_max_cost > 0 && (parent_cost + segment_entry_cost + segment_cost) > m_max_cost) {
- end_segment_reason |= ESRB_MAX_COST_EXCEEDED;
+ end_segment_reason |= ESRB_PATH_TOO_LONG;
}
/* Move to the next tile/trackdir. */
@@ -563,7 +563,7 @@ no_entry_cost: // jump here at the beginning if the node has no parent (it is th
} // for (;;)
/* Don't consider path any further it if exceeded max_cost. */
- if (end_segment_reason & ESRB_MAX_COST_EXCEEDED) return false;
+ if (end_segment_reason & ESRB_PATH_TOO_LONG) return false;
bool target_seen = false;
if ((end_segment_reason & ESRB_POSSIBLE_TARGET) != ESRB_NONE) {