OpenTTD Source
1.11.0-beta2
|
Cost Provider module of YAPF for ships. More...
Public Types | |
typedef Types::Tpf | Tpf |
the pathfinder class (derived from THIS class) | |
typedef Types::TrackFollower | TrackFollower |
typedef Types::NodeList::Titem | Node |
this will be our node type | |
typedef Node::Key | Key |
key to hash tables | |
Public Member Functions | |
int | CurveCost (Trackdir td1, Trackdir td2) |
bool | PfCalcCost (Node &n, const TrackFollower *tf) |
Called by YAPF to calculate the cost from the origin to the given node. More... | |
Static Public Member Functions | |
static Vehicle * | CountShipProc (Vehicle *v, void *data) |
Protected Member Functions | |
Tpf & | Yapf () |
to access inherited path finder | |
Cost Provider module of YAPF for ships.
Definition at line 236 of file yapf_ship.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 281 of file yapf_ship.cpp.
References HasVehicleOnPos(), IsDiagonalTrackdir(), IsDockingTile(), YAPF_TILE_CORNER_LENGTH, and YAPF_TILE_LENGTH.