summaryrefslogtreecommitdiff
path: root/src/pathfinder/yapf/yapf_node.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/pathfinder/yapf/yapf_node.hpp')
-rw-r--r--src/pathfinder/yapf/yapf_node.hpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/pathfinder/yapf/yapf_node.hpp b/src/pathfinder/yapf/yapf_node.hpp
index b3021096b..e510b2a6c 100644
--- a/src/pathfinder/yapf/yapf_node.hpp
+++ b/src/pathfinder/yapf/yapf_node.hpp
@@ -67,6 +67,7 @@ struct CYapfNodeT {
Node *m_parent;
int m_cost;
int m_estimate;
+ bool m_is_choice;
inline void Set(Node *parent, TileIndex tile, Trackdir td, bool is_choice)
{
@@ -75,6 +76,7 @@ struct CYapfNodeT {
m_parent = parent;
m_cost = 0;
m_estimate = 0;
+ m_is_choice = is_choice;
}
inline Node *GetHashNext()
@@ -112,6 +114,11 @@ struct CYapfNodeT {
return m_estimate;
}
+ inline bool GetIsChoice() const
+ {
+ return m_is_choice;
+ }
+
inline bool operator<(const Node &other) const
{
return m_estimate < other.m_estimate;