|
@@ -25,14 +25,14 @@ public:
|
|
|
protected:
|
|
|
/// to access inherited path finder
|
|
|
FORCEINLINE Tpf& Yapf() {return *static_cast<Tpf*>(this);}
|
|
|
|
|
|
public:
|
|
|
/** Called by YAPF to move from the given node to the next tile. For each
|
|
|
* reachable trackdir on the new tile creates new node, initializes it
|
|
|
* and adds it to the open list by calling Yapf().AddNewNode(n) */
|
|
|
* reachable trackdir on the new tile creates new node, initializes it
|
|
|
* and adds it to the open list by calling Yapf().AddNewNode(n) */
|
|
|
inline void PfFollowNode(Node& old_node)
|
|
|
{
|
|
|
TrackFollower F(Yapf().GetVehicle());
|
|
|
if (F.Follow(old_node.GetLastTile(), old_node.GetLastTrackdir()))
|
|
|
Yapf().AddMultipleNodes(&old_node, F.m_new_tile, F.m_new_td_bits);
|
|
|
}
|
|
@@ -88,14 +88,14 @@ public:
|
|
|
protected:
|
|
|
/// to access inherited path finder
|
|
|
FORCEINLINE Tpf& Yapf() {return *static_cast<Tpf*>(this);}
|
|
|
|
|
|
public:
|
|
|
/** Called by YAPF to move from the given node to the next tile. For each
|
|
|
* reachable trackdir on the new tile creates new node, initializes it
|
|
|
* and adds it to the open list by calling Yapf().AddNewNode(n) */
|
|
|
* reachable trackdir on the new tile creates new node, initializes it
|
|
|
* and adds it to the open list by calling Yapf().AddNewNode(n) */
|
|
|
inline void PfFollowNode(Node& old_node)
|
|
|
{
|
|
|
TrackFollower F(Yapf().GetVehicle());
|
|
|
if (F.Follow(old_node.GetLastTile(), old_node.GetLastTrackdir()))
|
|
|
Yapf().AddMultipleNodes(&old_node, F.m_new_tile, F.m_new_td_bits);
|
|
|
}
|