File diff r15612:c4c9adbab3f3 → r15613:193c12018337
src/pathfinder/follow_track.hpp
Show inline comments
 
@@ -21,13 +21,14 @@
 
#include "../depot_map.h"
 
#include "pf_performance_timer.hpp"
 

	
 
/**
 
 * 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 */
 
 *  types w/ or w/o 90-deg turns allowed
 
 */
 
template <TransportType Ttr_type_, typename VehicleType, bool T90deg_turns_allowed_ = true, bool Tmask_reserved_tracks = false>
 
struct CFollowTrackT
 
{
 
	enum ErrorCode {
 
		EC_NONE,
 
		EC_OWNER,
 
@@ -110,13 +111,14 @@ struct CFollowTrackT
 
		}
 
		return INVALID_DIAGDIR;
 
	}
 

	
 
	/**
 
	 * main follower routine. Fills all members and return true on success.
 
	 *  Otherwise returns false if track can't be followed. */
 
	 *  Otherwise returns false if track can't be followed.
 
	 */
 
	inline bool Follow(TileIndex old_tile, Trackdir old_td)
 
	{
 
		m_old_tile = old_tile;
 
		m_old_td = old_td;
 
		m_err = EC_NONE;
 
		assert(((TrackStatusToTrackdirBits(GetTileTrackStatus(m_old_tile, TT(), IsRoadTT() && m_veh != NULL ? RoadVehicle::From(m_veh)->compatible_roadtypes : 0)) & TrackdirToTrackdirBits(m_old_td)) != 0) ||