diff options
author | PeterN <peter@fuzzle.org> | 2019-03-08 23:52:45 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-08 23:52:45 +0000 |
commit | 6c6971fb43514c4e4923c2ec3b1fdd9fe852617d (patch) | |
tree | 8dcb2138ea406a01392437dbb6312954484dba34 /src/pathfinder/yapf/yapf_node.hpp | |
parent | dae35188abdfd070ea833bb50ced79d92481a284 (diff) | |
download | openttd-6c6971fb43514c4e4923c2ec3b1fdd9fe852617d.tar.xz |
Add: Road vehicle path cache. (#7261)
Diffstat (limited to 'src/pathfinder/yapf/yapf_node.hpp')
-rw-r--r-- | src/pathfinder/yapf/yapf_node.hpp | 7 |
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; |