OpenTTD Source: CFollowTrackT< Ttr_type_, VehicleType, T90deg_turns_allowed_, Tmask_reserved_tracks > Struct Template Reference

OpenTTD Source 15.3

Public Types | Public Member Functions | Static Public Member Functions | Data Fields | Protected Member Functions
CFollowTrackT< Ttr_type_, VehicleType, T90deg_turns_allowed_, Tmask_reserved_tracks > Struct Template Reference

Track follower helper template class (can serve pathfinders and vehicle controllers). More...

`#include <follow_track.hpp>`

Inheritance diagram for CFollowTrackT< Ttr_type_, VehicleType, T90deg_turns_allowed_, Tmask_reserved_tracks >:

## Public Types
enum | ErrorCode : uint8_t { EC_NONE , EC_OWNER , EC_RAIL_ROAD_TYPE , EC_90DEG , EC_NO_WAY , EC_RESERVED }

## Public Member Functions
| CFollowTrackT (const VehicleType *v=nullptr, RailTypes railtype_override=INVALID_RAILTYPES)
| CFollowTrackT (Owner o, RailTypes railtype_override=INVALID_RAILTYPES)
void | Init (const VehicleType *v, RailTypes railtype_override)
void | Init (Owner o, RailTypes railtype_override)
bool | IsTram ()
DiagDirection | GetSingleTramBit (TileIndex tile)
| Tests if a tile is a road tile with a single tramtrack (tram can reverse)
bool | Follow (TileIndex old_tile, Trackdir old_td)
| main follower routine.
bool | MaskReservedTracks ()
int | GetSpeedLimit (int *pmin_speed=nullptr) const
| Helper for pathfinders - get min/max speed on the old_tile/old_td.

## Static Public Member Functions
static TransportType | TT ()
static bool | IsWaterTT ()
static bool | IsRailTT ()
static bool | IsRoadTT ()
static bool | Allow90degTurns ()
static bool | DoTrackMasking ()

## Data Fields
const VehicleType * | veh
| moving vehicle
Owner | veh_owner
| owner of the vehicle
TileIndex | old_tile
| the origin (vehicle moved from) before move
Trackdir | old_td
| the trackdir (the vehicle was on) before move
TileIndex | new_tile
| the new tile (the vehicle has entered)
TrackdirBits | new_td_bits
| the new set of available trackdirs
DiagDirection | exitdir
| exit direction (leaving the old tile)
bool | is_tunnel
| last turn passed tunnel
bool | is_bridge
| last turn passed bridge ramp
bool | is_station
| last turn passed station
int | tiles_skipped
| number of skipped tunnel or station tiles
ErrorCode | err
RailTypes | railtypes

## Protected Member Functions
void | FollowTileExit ()
| Follow the exitdir from old_tile and fill new_tile and tiles_skipped.
bool | QueryNewTileTrackStatus ()
| stores track status (available trackdirs) for the new tile into new_td_bits
bool | CanExitOldTile ()
| return true if we can leave old_tile in exitdir
bool | CanEnterNewTile ()
| return true if we can enter new_tile from exitdir
bool | ForcedReverse ()
| return true if we must reverse (in depots and single tram bits)
bool | TryReverse ()
| return true if we successfully reversed at end of road/track

## Detailed Description

template<TransportType Ttr_type_, typename VehicleType, bool T90deg_turns_allowed_ = true, bool Tmask_reserved_tracks = false>
struct CFollowTrackT< Ttr_type_, VehicleType, T90deg_turns_allowed_, Tmask_reserved_tracks >

Track follower helper template class (can serve pathfinders and vehicle controllers).

See 6 different typedefs below for 3 different transport types w/ or w/o 90-deg turns allowed

Definition at line 28 of file follow_track.hpp.

## Member Enumeration Documentation

## ◆ ErrorCode

template<TransportType Ttr_type_, typename VehicleType , bool T90deg_turns_allowed_ = true, bool Tmask_reserved_tracks = false>

enum CFollowTrackT::ErrorCode : uint8_t

Definition at line 29 of file follow_track.hpp.

## Constructor & Destructor Documentation

## ◆ CFollowTrackT() [1/2]

template<TransportType Ttr_type_, typename VehicleType , bool T90deg_turns_allowed_ = true, bool Tmask_reserved_tracks = false>

CFollowTrackT< Ttr_type_, VehicleType, T90deg_turns_allowed_, Tmask_reserved_tracks >::CFollowTrackT | ( | const VehicleType * | v = `nullptr`,
|  | RailTypes | railtype_override = `INVALID_RAILTYPES`
| ) |  |
| inline

Definition at line 52 of file follow_track.hpp.

## ◆ CFollowTrackT() [2/2]

template<TransportType Ttr_type_, typename VehicleType , bool T90deg_turns_allowed_ = true, bool Tmask_reserved_tracks = false>

CFollowTrackT< Ttr_type_, VehicleType, T90deg_turns_allowed_, Tmask_reserved_tracks >::CFollowTrackT | ( | Owner | o,
|  | RailTypes | railtype_override = `INVALID_RAILTYPES`
| ) |  |
| inline

Definition at line 57 of file follow_track.hpp.

## Member Function Documentation

## ◆ Allow90degTurns()

template<TransportType Ttr_type_, typename VehicleType , bool T90deg_turns_allowed_ = true, bool Tmask_reserved_tracks = false>

static bool CFollowTrackT< Ttr_type_, VehicleType, T90deg_turns_allowed_, Tmask_reserved_tracks >::Allow90degTurns | ( |  | ) |
| inlinestatic

Definition at line 95 of file follow_track.hpp.

## ◆ CanEnterNewTile()

template<TransportType Ttr_type_, typename VehicleType , bool T90deg_turns_allowed_ = true, bool Tmask_reserved_tracks = false>

bool CFollowTrackT< Ttr_type_, VehicleType, T90deg_turns_allowed_, Tmask_reserved_tracks >::CanEnterNewTile | ( |  | ) |
| inlineprotected

return true if we can enter new_tile from exitdir

Definition at line 284 of file follow_track.hpp.

References BaseBitSet< Timpl, Tvalue_type, Tstorage, Tmask >::Any(), RoadVehicle::compatible_roadtypes, CFollowTrackT< Ttr_type_, VehicleType, T90deg_turns_allowed_, Tmask_reserved_tracks >::exitdir, SpecializedVehicle< T, Type >::From(), GetBayRoadStopDir(), BaseStation::GetByTile(), BaseStation::GetPlatformLength(), GetRailDepotDirection(), GetRoadDepotDirection(), CFollowTrackT< Ttr_type_, VehicleType, T90deg_turns_allowed_, Tmask_reserved_tracks >::GetSingleTramBit(), GetTileOwner(), GetTileRailType(), GetTunnelBridgeDirection(), INVALID_DIAGDIR, IsBayRoadStopTile(), IsDepotTypeTile(), IsTileType(), IsTunnel(), MP_TUNNELBRIDGE, ReverseDiagDir(), RoadVehicle::roadtype, BaseBitSet< Timpl, Tvalue_type, Tstorage, Tmask >::Test(), TileAdd(), TileOffsByDiagDir(), CFollowTrackT< Ttr_type_, VehicleType, T90deg_turns_allowed_, Tmask_reserved_tracks >::tiles_skipped, and TrackdirToExitdir().

Referenced by CFollowTrackT< Ttr_type_, VehicleType, T90deg_turns_allowed_, Tmask_reserved_tracks >::Follow().

## ◆ CanExitOldTile()

template<TransportType Ttr_type_, typename VehicleType , bool T90deg_turns_allowed_ = true, bool Tmask_reserved_tracks = false>

bool CFollowTrackT< Ttr_type_, VehicleType, T90deg_turns_allowed_, Tmask_reserved_tracks >::CanExitOldTile | ( |  | ) |
| inlineprotected

return true if we can leave old_tile in exitdir

Definition at line 252 of file follow_track.hpp.

References CFollowTrackT< Ttr_type_, VehicleType, T90deg_turns_allowed_, Tmask_reserved_tracks >::exitdir, GetBayRoadStopDir(), GetRoadDepotDirection(), CFollowTrackT< Ttr_type_, VehicleType, T90deg_turns_allowed_, Tmask_reserved_tracks >::GetSingleTramBit(), INVALID_DIAGDIR, IsBayRoadStopTile(), and IsDepotTypeTile().

Referenced by CFollowTrackT< Ttr_type_, VehicleType, T90deg_turns_allowed_, Tmask_reserved_tracks >::Follow().

## ◆ DoTrackMasking()

template<TransportType Ttr_type_, typename VehicleType , bool T90deg_turns_allowed_ = true, bool Tmask_reserved_tracks = false>

static bool CFollowTrackT< Ttr_type_, VehicleType, T90deg_turns_allowed_, Tmask_reserved_tracks >::DoTrackMasking | ( |  | ) |
| inlinestatic

Definition at line 96 of file follow_track.hpp.

## ◆ Follow()

template<TransportType Ttr_type_, typename VehicleType , bool T90deg_turns_allowed_ = true, bool Tmask_reserved_tracks = false>

bool CFollowTrackT< Ttr_type_, VehicleType, T90deg_turns_allowed_, Tmask_reserved_tracks >::Follow | ( | TileIndex | old_tile,
|  | Trackdir | old_td
| ) |  |
| inline

main follower routine.

Fills all members and return true on success. Otherwise returns false if track can't be followed.

Definition at line 120 of file follow_track.hpp.

References CFollowTrackT< Ttr_type_, VehicleType, T90deg_turns_allowed_, Tmask_reserved_tracks >::CanEnterNewTile(), CFollowTrackT< Ttr_type_, VehicleType, T90deg_turns_allowed_, Tmask_reserved_tracks >::CanExitOldTile(), DiagdirReachesTrackdirs(), CFollowTrackT< Ttr_type_, VehicleType, T90deg_turns_allowed_, Tmask_reserved_tracks >::FollowTileExit(), CFollowTrackT< Ttr_type_, VehicleType, T90deg_turns_allowed_, Tmask_reserved_tracks >::ForcedReverse(), CFollowTrackT< Ttr_type_, VehicleType, T90deg_turns_allowed_, Tmask_reserved_tracks >::GetSingleTramBit(), GetTileRailType(), GetTileTrackStatus(), INVALID_DIAGDIR, CFollowTrackT< Ttr_type_, VehicleType, T90deg_turns_allowed_, Tmask_reserved_tracks >::old_td, CFollowTrackT< Ttr_type_, VehicleType, T90deg_turns_allowed_, Tmask_reserved_tracks >::old_tile, CFollowTrackT< Ttr_type_, VehicleType, T90deg_turns_allowed_, Tmask_reserved_tracks >::QueryNewTileTrackStatus(), Rail90DegTurnDisallowed(), RTT_ROAD, RTT_TRAM, TRACKDIR_BIT_NONE, TrackdirCrossesTrackdirs(), TrackdirToExitdir(), TrackdirToTrackdirBits(), TrackStatusToTrackdirBits(), and CFollowTrackT< Ttr_type_, VehicleType, T90deg_turns_allowed_, Tmask_reserved_tracks >::TryReverse().

Referenced by CheckNextTrainTile(), ExtendTrainReservation(), FollowReservation(), WaterRegion::ForceUpdate(), FreeTrainTrackReservation(), IsSafeWaitingPosition(), and CYapfCostRailT< Types >::PfCalcCost().

## ◆ FollowTileExit()

template<TransportType Ttr_type_, typename VehicleType , bool T90deg_turns_allowed_ = true, bool Tmask_reserved_tracks = false>

void CFollowTrackT< Ttr_type_, VehicleType, T90deg_turns_allowed_, Tmask_reserved_tracks >::FollowTileExit | ( |  | ) |
| inlineprotected

Follow the exitdir from old_tile and fill new_tile and tiles_skipped.

Definition at line 202 of file follow_track.hpp.

References GetOtherBridgeEnd(), GetOtherTunnelEnd(), GetTunnelBridgeDirection(), GetTunnelBridgeLength(), HasStationTileRail(), IsStationRoadStopTile(), IsTileType(), IsTunnel(), MP_TUNNELBRIDGE, ReverseDiagDir(), and TileAddByDiagDir().

Referenced by CFollowTrackT< Ttr_type_, VehicleType, T90deg_turns_allowed_, Tmask_reserved_tracks >::Follow().

## ◆ ForcedReverse()

template<TransportType Ttr_type_, typename VehicleType , bool T90deg_turns_allowed_ = true, bool Tmask_reserved_tracks = false>

bool CFollowTrackT< Ttr_type_, VehicleType, T90deg_turns_allowed_, Tmask_reserved_tracks >::ForcedReverse | ( |  | ) |
| inlineprotected

return true if we must reverse (in depots and single tram bits)

Definition at line 392 of file follow_track.hpp.

References CFollowTrackT< Ttr_type_, VehicleType, T90deg_turns_allowed_, Tmask_reserved_tracks >::exitdir, GetBayRoadStopDir(), GetRailDepotDirection(), GetRoadDepotDirection(), CFollowTrackT< Ttr_type_, VehicleType, T90deg_turns_allowed_, Tmask_reserved_tracks >::GetSingleTramBit(), IsBayRoadStopTile(), IsDepotTypeTile(), CFollowTrackT< Ttr_type_, VehicleType, T90deg_turns_allowed_, Tmask_reserved_tracks >::old_tile, ReverseDiagDir(), ReverseTrackdir(), and TrackdirToTrackdirBits().

Referenced by CFollowTrackT< Ttr_type_, VehicleType, T90deg_turns_allowed_, Tmask_reserved_tracks >::Follow().

## ◆ GetSingleTramBit()

template<TransportType Ttr_type_, typename VehicleType , bool T90deg_turns_allowed_ = true, bool Tmask_reserved_tracks = false>

DiagDirection CFollowTrackT< Ttr_type_, VehicleType, T90deg_turns_allowed_, Tmask_reserved_tracks >::GetSingleTramBit | ( | TileIndex | tile | ) |
| inline

Tests if a tile is a road tile with a single tramtrack (tram can reverse)

Definition at line 99 of file follow_track.hpp.

References DIAGDIR_NE, DIAGDIR_NW, DIAGDIR_SE, DIAGDIR_SW, GetRoadBits(), INVALID_DIAGDIR, IsNormalRoadTile(), ROAD_NE, ROAD_NW, ROAD_SE, ROAD_SW, and RTT_TRAM.

Referenced by CFollowTrackT< Ttr_type_, VehicleType, T90deg_turns_allowed_, Tmask_reserved_tracks >::CanEnterNewTile(), CFollowTrackT< Ttr_type_, VehicleType, T90deg_turns_allowed_, Tmask_reserved_tracks >::CanExitOldTile(), CFollowTrackT< Ttr_type_, VehicleType, T90deg_turns_allowed_, Tmask_reserved_tracks >::Follow(), and CFollowTrackT< Ttr_type_, VehicleType, T90deg_turns_allowed_, Tmask_reserved_tracks >::ForcedReverse().

## ◆ GetSpeedLimit()

template<TransportType Ttr_type_, typename VehicleType , bool T90deg_turns_allowed_ = true, bool Tmask_reserved_tracks = false>

int CFollowTrackT< Ttr_type_, VehicleType, T90deg_turns_allowed_, Tmask_reserved_tracks >::GetSpeedLimit | ( | int * | pmin_speed = `nullptr` | ) | const
| inline

Helper for pathfinders - get min/max speed on the old_tile/old_td.

Definition at line 449 of file follow_track.hpp.

References SpecializedVehicle< T, Type >::From(), GetBridgeSpec(), GetBridgeType(), GetRailType(), GetRailTypeInfo(), GetRoadTypeInfo(), IsBridgeTile(), RailTypeInfo::max_speed, RoadTypeInfo::max_speed, and BridgeSpec::speed.

## ◆ Init() [1/2]

template<TransportType Ttr_type_, typename VehicleType , bool T90deg_turns_allowed_ = true, bool Tmask_reserved_tracks = false>

void CFollowTrackT< Ttr_type_, VehicleType, T90deg_turns_allowed_, Tmask_reserved_tracks >::Init | ( | const VehicleType * | v,
|  | RailTypes | railtype_override
| ) |  |
| inline

Definition at line 64 of file follow_track.hpp.

## ◆ Init() [2/2]

template<TransportType Ttr_type_, typename VehicleType , bool T90deg_turns_allowed_ = true, bool Tmask_reserved_tracks = false>

void CFollowTrackT< Ttr_type_, VehicleType, T90deg_turns_allowed_, Tmask_reserved_tracks >::Init | ( | Owner | o,
|  | RailTypes | railtype_override
| ) |  |
| inline

Definition at line 71 of file follow_track.hpp.

## ◆ IsRailTT()

template<TransportType Ttr_type_, typename VehicleType , bool T90deg_turns_allowed_ = true, bool Tmask_reserved_tracks = false>

static bool CFollowTrackT< Ttr_type_, VehicleType, T90deg_turns_allowed_, Tmask_reserved_tracks >::IsRailTT | ( |  | ) |
| inlinestatic

Definition at line 92 of file follow_track.hpp.

## ◆ IsRoadTT()

template<TransportType Ttr_type_, typename VehicleType , bool T90deg_turns_allowed_ = true, bool Tmask_reserved_tracks = false>

static bool CFollowTrackT< Ttr_type_, VehicleType, T90deg_turns_allowed_, Tmask_reserved_tracks >::IsRoadTT | ( |  | ) |
| inlinestatic

Definition at line 94 of file follow_track.hpp.

## ◆ IsTram()

template<TransportType Ttr_type_, typename VehicleType , bool T90deg_turns_allowed_ = true, bool Tmask_reserved_tracks = false>

bool CFollowTrackT< Ttr_type_, VehicleType, T90deg_turns_allowed_, Tmask_reserved_tracks >::IsTram | ( |  | ) |
| inline

Definition at line 93 of file follow_track.hpp.

## ◆ IsWaterTT()

template<TransportType Ttr_type_, typename VehicleType , bool T90deg_turns_allowed_ = true, bool Tmask_reserved_tracks = false>

static bool CFollowTrackT< Ttr_type_, VehicleType, T90deg_turns_allowed_, Tmask_reserved_tracks >::IsWaterTT | ( |  | ) |
| inlinestatic

Definition at line 91 of file follow_track.hpp.

## ◆ MaskReservedTracks()

template<TransportType Ttr_type_, typename VehicleType , bool T90deg_turns_allowed_ = true, bool Tmask_reserved_tracks = false>

bool CFollowTrackT< Ttr_type_, VehicleType, T90deg_turns_allowed_, Tmask_reserved_tracks >::MaskReservedTracks | ( |  | ) |
| inline

Definition at line 170 of file follow_track.hpp.

## ◆ QueryNewTileTrackStatus()

template<TransportType Ttr_type_, typename VehicleType , bool T90deg_turns_allowed_ = true, bool Tmask_reserved_tracks = false>

bool CFollowTrackT< Ttr_type_, VehicleType, T90deg_turns_allowed_, Tmask_reserved_tracks >::QueryNewTileTrackStatus | ( |  | ) |
| inlineprotected

stores track status (available trackdirs) for the new tile into new_td_bits

Definition at line 239 of file follow_track.hpp.

References GetTileTrackStatus(), GetTrackBits(), GetTrackdirBitsForRoad(), IsPlainRailTile(), RTT_ROAD, RTT_TRAM, TRACKDIR_BIT_NONE, and TrackStatusToTrackdirBits().

Referenced by CFollowTrackT< Ttr_type_, VehicleType, T90deg_turns_allowed_, Tmask_reserved_tracks >::Follow(), and CFollowTrackT< Ttr_type_, VehicleType, T90deg_turns_allowed_, Tmask_reserved_tracks >::TryReverse().

## ◆ TryReverse()

template<TransportType Ttr_type_, typename VehicleType , bool T90deg_turns_allowed_ = true, bool Tmask_reserved_tracks = false>

bool CFollowTrackT< Ttr_type_, VehicleType, T90deg_turns_allowed_, Tmask_reserved_tracks >::TryReverse | ( |  | ) |
| inlineprotected

return true if we successfully reversed at end of road/track

Definition at line 428 of file follow_track.hpp.

References DiagdirReachesTrackdirs(), CFollowTrackT< Ttr_type_, VehicleType, T90deg_turns_allowed_, Tmask_reserved_tracks >::old_tile, CFollowTrackT< Ttr_type_, VehicleType, T90deg_turns_allowed_, Tmask_reserved_tracks >::QueryNewTileTrackStatus(), ReverseDiagDir(), and TRACKDIR_BIT_NONE.

Referenced by CFollowTrackT< Ttr_type_, VehicleType, T90deg_turns_allowed_, Tmask_reserved_tracks >::Follow().

## ◆ TT()

template<TransportType Ttr_type_, typename VehicleType , bool T90deg_turns_allowed_ = true, bool Tmask_reserved_tracks = false>

static TransportType CFollowTrackT< Ttr_type_, VehicleType, T90deg_turns_allowed_, Tmask_reserved_tracks >::TT | ( |  | ) |
| inlinestatic

Definition at line 90 of file follow_track.hpp.

## Field Documentation

## ◆ err

template<TransportType Ttr_type_, typename VehicleType , bool T90deg_turns_allowed_ = true, bool Tmask_reserved_tracks = false>

ErrorCode CFollowTrackT< Ttr_type_, VehicleType, T90deg_turns_allowed_, Tmask_reserved_tracks >::err

Definition at line 49 of file follow_track.hpp.

## ◆ exitdir

template<TransportType Ttr_type_, typename VehicleType , bool T90deg_turns_allowed_ = true, bool Tmask_reserved_tracks = false>

DiagDirection CFollowTrackT< Ttr_type_, VehicleType, T90deg_turns_allowed_, Tmask_reserved_tracks >::exitdir

exit direction (leaving the old tile)

Definition at line 44 of file follow_track.hpp.

Referenced by CFollowTrackT< Ttr_type_, VehicleType, T90deg_turns_allowed_, Tmask_reserved_tracks >::CanEnterNewTile(), CFollowTrackT< Ttr_type_, VehicleType, T90deg_turns_allowed_, Tmask_reserved_tracks >::CanExitOldTile(), CheckNextTrainTile(), ExtendTrainReservation(), FollowReservation(), CFollowTrackT< Ttr_type_, VehicleType, T90deg_turns_allowed_, Tmask_reserved_tracks >::ForcedReverse(), and IsSafeWaitingPosition().

## ◆ is_bridge

template<TransportType Ttr_type_, typename VehicleType , bool T90deg_turns_allowed_ = true, bool Tmask_reserved_tracks = false>

bool CFollowTrackT< Ttr_type_, VehicleType, T90deg_turns_allowed_, Tmask_reserved_tracks >::is_bridge

last turn passed bridge ramp

Definition at line 46 of file follow_track.hpp.

Referenced by WaterRegion::ForceUpdate(), and FreeTrainTrackReservation().

## ◆ is_station

template<TransportType Ttr_type_, typename VehicleType , bool T90deg_turns_allowed_ = true, bool Tmask_reserved_tracks = false>

bool CFollowTrackT< Ttr_type_, VehicleType, T90deg_turns_allowed_, Tmask_reserved_tracks >::is_station

last turn passed station

Definition at line 47 of file follow_track.hpp.

Referenced by ExtendTrainReservation(), FollowReservation(), and FreeTrainTrackReservation().

## ◆ is_tunnel

template<TransportType Ttr_type_, typename VehicleType , bool T90deg_turns_allowed_ = true, bool Tmask_reserved_tracks = false>

bool CFollowTrackT< Ttr_type_, VehicleType, T90deg_turns_allowed_, Tmask_reserved_tracks >::is_tunnel

last turn passed tunnel

Definition at line 45 of file follow_track.hpp.

Referenced by FreeTrainTrackReservation().

## ◆ new_td_bits

template<TransportType Ttr_type_, typename VehicleType , bool T90deg_turns_allowed_ = true, bool Tmask_reserved_tracks = false>

TrackdirBits CFollowTrackT< Ttr_type_, VehicleType, T90deg_turns_allowed_, Tmask_reserved_tracks >::new_td_bits

the new set of available trackdirs

Definition at line 43 of file follow_track.hpp.

Referenced by CheckNextTrainTile(), ExtendTrainReservation(), FollowReservation(), FreeTrainTrackReservation(), IsSafeWaitingPosition(), IsWaitingPositionFree(), and CYapfCostRailT< Types >::PfCalcCost().

## ◆ new_tile

template<TransportType Ttr_type_, typename VehicleType , bool T90deg_turns_allowed_ = true, bool Tmask_reserved_tracks = false>

TileIndex CFollowTrackT< Ttr_type_, VehicleType, T90deg_turns_allowed_, Tmask_reserved_tracks >::new_tile

the new tile (the vehicle has entered)

Definition at line 42 of file follow_track.hpp.

Referenced by CheckNextTrainTile(), ExtendTrainReservation(), FollowReservation(), WaterRegion::ForceUpdate(), FreeTrainTrackReservation(), IsSafeWaitingPosition(), and CYapfCostRailT< Types >::PfCalcCost().

## ◆ old_td

template<TransportType Ttr_type_, typename VehicleType , bool T90deg_turns_allowed_ = true, bool Tmask_reserved_tracks = false>

Trackdir CFollowTrackT< Ttr_type_, VehicleType, T90deg_turns_allowed_, Tmask_reserved_tracks >::old_td

the trackdir (the vehicle was on) before move

Definition at line 41 of file follow_track.hpp.

Referenced by CheckNextTrainTile(), ExtendTrainReservation(), and CFollowTrackT< Ttr_type_, VehicleType, T90deg_turns_allowed_, Tmask_reserved_tracks >::Follow().

## ◆ old_tile

template<TransportType Ttr_type_, typename VehicleType , bool T90deg_turns_allowed_ = true, bool Tmask_reserved_tracks = false>

TileIndex CFollowTrackT< Ttr_type_, VehicleType, T90deg_turns_allowed_, Tmask_reserved_tracks >::old_tile

the origin (vehicle moved from) before move

Definition at line 40 of file follow_track.hpp.

Referenced by CheckNextTrainTile(), ExtendTrainReservation(), CFollowTrackT< Ttr_type_, VehicleType, T90deg_turns_allowed_, Tmask_reserved_tracks >::Follow(), CFollowTrackT< Ttr_type_, VehicleType, T90deg_turns_allowed_, Tmask_reserved_tracks >::ForcedReverse(), IsSafeWaitingPosition(), and CFollowTrackT< Ttr_type_, VehicleType, T90deg_turns_allowed_, Tmask_reserved_tracks >::TryReverse().

## ◆ railtypes

template<TransportType Ttr_type_, typename VehicleType , bool T90deg_turns_allowed_ = true, bool Tmask_reserved_tracks = false>

RailTypes CFollowTrackT< Ttr_type_, VehicleType, T90deg_turns_allowed_, Tmask_reserved_tracks >::railtypes

Definition at line 50 of file follow_track.hpp.

## ◆ tiles_skipped

template<TransportType Ttr_type_, typename VehicleType , bool T90deg_turns_allowed_ = true, bool Tmask_reserved_tracks = false>

int CFollowTrackT< Ttr_type_, VehicleType, T90deg_turns_allowed_, Tmask_reserved_tracks >::tiles_skipped

number of skipped tunnel or station tiles

Definition at line 48 of file follow_track.hpp.

Referenced by CFollowTrackT< Ttr_type_, VehicleType, T90deg_turns_allowed_, Tmask_reserved_tracks >::CanEnterNewTile(), ExtendTrainReservation(), and FollowReservation().

## ◆ veh

template<TransportType Ttr_type_, typename VehicleType , bool T90deg_turns_allowed_ = true, bool Tmask_reserved_tracks = false>

const VehicleType* CFollowTrackT< Ttr_type_, VehicleType, T90deg_turns_allowed_, Tmask_reserved_tracks >::veh

moving vehicle

Definition at line 38 of file follow_track.hpp.

## ◆ veh_owner

template<TransportType Ttr_type_, typename VehicleType , bool T90deg_turns_allowed_ = true, bool Tmask_reserved_tracks = false>

Owner CFollowTrackT< Ttr_type_, VehicleType, T90deg_turns_allowed_, Tmask_reserved_tracks >::veh_owner

owner of the vehicle

Definition at line 39 of file follow_track.hpp.

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

- src/pathfinder/follow_track.hpp