summaryrefslogtreecommitdiff
path: root/src/pathfinder/yapf/yapf_node_ship.hpp
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2019-03-11 10:37:47 +0000
committerNiels Martin Hansen <nielsm@indvikleren.dk>2019-06-30 16:46:32 +0200
commitf538179878370b3bec8bf1575dc30c1377461ebc (patch)
tree890738c37245a49eb2a8ad52f4afb805baaa9d42 /src/pathfinder/yapf/yapf_node_ship.hpp
parentf1c39153413b07a964dfde8fd9d6310f0da4987b (diff)
downloadopenttd-f538179878370b3bec8bf1575dc30c1377461ebc.tar.xz
Feature: Multi-tile docks and docking points.
Diffstat (limited to 'src/pathfinder/yapf/yapf_node_ship.hpp')
-rw-r--r--src/pathfinder/yapf/yapf_node_ship.hpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/pathfinder/yapf/yapf_node_ship.hpp b/src/pathfinder/yapf/yapf_node_ship.hpp
index df4254fd9..a8f827071 100644
--- a/src/pathfinder/yapf/yapf_node_ship.hpp
+++ b/src/pathfinder/yapf/yapf_node_ship.hpp
@@ -14,7 +14,19 @@
/** Yapf Node for ships */
template <class Tkey_>
-struct CYapfShipNodeT : CYapfNodeT<Tkey_, CYapfShipNodeT<Tkey_> > { };
+struct CYapfShipNodeT : CYapfNodeT<Tkey_, CYapfShipNodeT<Tkey_> > {
+ typedef CYapfNodeT<Tkey_, CYapfShipNodeT<Tkey_> > base;
+
+ TileIndex m_segment_last_tile;
+ Trackdir m_segment_last_td;
+
+ void Set(CYapfShipNodeT *parent, TileIndex tile, Trackdir td, bool is_choice)
+ {
+ base::Set(parent, tile, td, is_choice);
+ m_segment_last_tile = tile;
+ m_segment_last_td = td;
+ }
+};
/* now define two major node types (that differ by key type) */
typedef CYapfShipNodeT<CYapfNodeKeyExitDir> CYapfShipNodeExitDir;