File diff r8615:80a1f1db1d98 → r8616:656db5986c9e
src/yapf/follow_track.hpp
Show inline comments
 
@@ -61,13 +61,13 @@ struct CFollowTrackT : public FollowTrac
 
	 *  Otherwise returns false if track can't be followed. */
 
	FORCEINLINE bool Follow(TileIndex old_tile, Trackdir old_td)
 
	{
 
		m_old_tile = old_tile;
 
		m_old_td = old_td;
 
		m_err = EC_NONE;
 
		assert(((GetTileTrackStatus(m_old_tile, TT(), m_veh->u.road.compatible_roadtypes) & TrackdirToTrackdirBits(m_old_td)) != 0) ||
 
		assert(((TrackStatusToTrackdirBits(GetTileTrackStatus(m_old_tile, TT(), m_veh->u.road.compatible_roadtypes)) & TrackdirToTrackdirBits(m_old_td)) != 0) ||
 
		       (GetSingleTramBit(m_old_tile) != INVALID_DIAGDIR)); // Disable the assertion for single tram bits
 
		m_exitdir = TrackdirToExitdir(m_old_td);
 
		if (ForcedReverse()) return true;
 
		if (!CanExitOldTile()) return false;
 
		FollowTileExit();
 
		if (!QueryNewTileTrackStatus()) return TryReverse();
 
@@ -130,14 +130,13 @@ protected:
 
	FORCEINLINE bool QueryNewTileTrackStatus()
 
	{
 
		CPerfStart perf(*m_pPerf);
 
		if (IsRailTT() && GetTileType(m_new_tile) == MP_RAILWAY && IsPlainRailTile(m_new_tile)) {
 
			m_new_td_bits = (TrackdirBits)(GetTrackBits(m_new_tile) * 0x101);
 
		} else {
 
			uint32 ts = GetTileTrackStatus(m_new_tile, TT(), m_veh->u.road.compatible_roadtypes);
 
			m_new_td_bits = (TrackdirBits)(ts & TRACKDIR_BIT_MASK);
 
			m_new_td_bits = TrackStatusToTrackdirBits(GetTileTrackStatus(m_new_tile, TT(), m_veh->u.road.compatible_roadtypes));
 

	
 
			if (m_new_td_bits == 0) {
 
				/* GetTileTrackStatus() returns 0 for single tram bits.
 
				 * As we cannot change it there (easily) without breaking something, change it here */
 
				switch (GetSingleTramBit(m_new_tile)) {
 
					case DIAGDIR_NE: