src/yapf/yapf_destrail.hpp
changeset 10210 a542a6d595fc
parent 10207 c291a21b304e
equal deleted inserted replaced
10209:a1e7417bf1b7 10210:a542a6d595fc
    83 
    83 
    84 	/// Called by YAPF to detect if node ends in the desired destination
    84 	/// Called by YAPF to detect if node ends in the desired destination
    85 	FORCEINLINE bool PfDetectDestination(TileIndex tile, Trackdir td)
    85 	FORCEINLINE bool PfDetectDestination(TileIndex tile, Trackdir td)
    86 	{
    86 	{
    87 		return
    87 		return
    88 			IsSafeWaitingPosition(Yapf().GetVehicle(), tile, td, true, TrackFollower::Allow90degTurns()) &&
    88 			IsSafeWaitingPosition(Yapf().GetVehicle(), tile, td, true, !TrackFollower::Allow90degTurns()) &&
    89 			IsWaitingPositionFree(Yapf().GetVehicle(), tile, td, TrackFollower::Allow90degTurns());
    89 			IsWaitingPositionFree(Yapf().GetVehicle(), tile, td, !TrackFollower::Allow90degTurns());
    90 	}
    90 	}
    91 
    91 
    92 	/** Called by YAPF to calculate cost estimate. Calculates distance to the destination
    92 	/** Called by YAPF to calculate cost estimate. Calculates distance to the destination
    93 	 *  adds it to the actual cost from origin and stores the sum to the Node::m_estimate. */
    93 	 *  adds it to the actual cost from origin and stores the sum to the Node::m_estimate. */
    94 	FORCEINLINE bool PfCalcEstimate(Node& n)
    94 	FORCEINLINE bool PfCalcEstimate(Node& n)