OpenTTD Source 20260421-master-gc2fbc6fdeb
CYapfRailBase< Types > Struct Template Reference
Inheritance diagram for CYapfRailBase< Types >:
CYapfT< Types >

Public Types

typedef Types::NodeList::Item Node

Public Member Functions

void PruneIntermediateNodeBranch (Node *n)
 In some cases an intermediate node branch should be pruned.

Detailed Description

template<typename Types>
struct CYapfRailBase< Types >

Definition at line 564 of file yapf_rail.cpp.

Member Typedef Documentation

◆ Node

template<typename Types>
typedef Types::NodeList::Item CYapfRailBase< Types >::Node

Definition at line 565 of file yapf_rail.cpp.

Member Function Documentation

◆ PruneIntermediateNodeBranch()

template<typename Types>
void CYapfRailBase< Types >::PruneIntermediateNodeBranch ( Node * n)
inline

In some cases an intermediate node branch should be pruned.

The most prominent case is when a red EOL signal is encountered, but there was a segment change (e.g. a rail type change) before that. If the branch would not be pruned, the rail type change location would remain the best intermediate node, and thus the vehicle would still go towards the red EOL signal.

Parameters
nThe node to start pruning at.

Definition at line 576 of file yapf_rail.cpp.

References ChoiceFollows.


The documentation for this struct was generated from the following file: