File diff r4548:6a33e364fba5 → r4549:76b9213799ac
yapf/yapf_destrail.hpp
Show inline comments
 
@@ -43,13 +43,13 @@ public:
 
	{
 
		bool bDest = IsTileDepotType(tile, TRANSPORT_RAIL);
 
		return bDest;
 
	}
 

	
 
	/** Called by YAPF to calculate cost estimate. Calculates distance to the destination
 
	*   adds it to the actual cost from origin and stores the sum to the Node::m_estimate */
 
	 *  adds it to the actual cost from origin and stores the sum to the Node::m_estimate */
 
	FORCEINLINE bool PfCalcEstimate(Node& n)
 
	{
 
		n.m_estimate = n.m_cost;
 
		return true;
 
	}
 
};
 
@@ -115,13 +115,13 @@ public:
 
				&& ((m_destTrackdirs & TrackdirToTrackdirBits(td)) != TRACKDIR_BIT_NONE);
 
		}
 
		return bDest;
 
	}
 

	
 
	/** Called by YAPF to calculate cost estimate. Calculates distance to the destination
 
	*   adds it to the actual cost from origin and stores the sum to the Node::m_estimate */
 
	 *  adds it to the actual cost from origin and stores the sum to the Node::m_estimate */
 
	FORCEINLINE bool PfCalcEstimate(Node& n)
 
	{
 
		static int dg_dir_to_x_offs[] = {-1, 0, 1, 0};
 
		static int dg_dir_to_y_offs[] = {0, 1, 0, -1};
 
		if (PfDetectDestination(n)) {
 
			n.m_estimate = n.m_cost;