OpenTTD Source
20241121-master-g67a0fccfad
|
Public Types | |
typedef Types::Tpf | Tpf |
pathfinder (derived from THIS class) | |
typedef Types::TrackFollower | TrackFollower |
track follower helper | |
typedef Types::NodeList::Item | Node |
this will be our node type | |
typedef Node::Key | Key |
key to hash tables | |
Public Member Functions | |
void | SetMaxCost (int max_cost) |
bool | PfCalcCost (Node &n, const TrackFollower *) |
Called by YAPF to calculate the cost from the origin to the given node. More... | |
Protected Member Functions | |
Tpf & | Yapf () |
to access inherited path finder | |
int | SlopeCost (TileIndex tile, TileIndex next_tile, Trackdir) |
int | OneTileCost (TileIndex tile, Trackdir trackdir) |
return one tile cost | |
Protected Attributes | |
int | max_cost |
Definition at line 19 of file yapf_road.cpp.
|
inline |
Called by YAPF to calculate the cost from the origin to the given node.
Calculates only the cost of given node, adds it to the parent node cost and stores the result into Node::m_cost member
Definition at line 114 of file yapf_road.cpp.
References DiagDirToDiagTrackdir(), GetRoadDepotDirection(), IsRoadDepotTile(), ReverseDiagDir(), and CYapfCostRoadT< Types >::Yapf().