src/yapf/yapf_road.cpp
branchNewGRF_ports
changeset 6871 5a9dc001e1ad
parent 6743 cabfaa4a0295
child 6878 7d1ff2f621c7
equal deleted inserted replaced
6870:ca3fd1fbe311 6871:5a9dc001e1ad
    95 			// if there are no reachable trackdirs on new tile, we have end of road
    95 			// if there are no reachable trackdirs on new tile, we have end of road
    96 			TrackFollower F(Yapf().GetVehicle());
    96 			TrackFollower F(Yapf().GetVehicle());
    97 			if (!F.Follow(tile, trackdir)) break;
    97 			if (!F.Follow(tile, trackdir)) break;
    98 
    98 
    99 			// if there are more trackdirs available & reachable, we are at the end of segment
    99 			// if there are more trackdirs available & reachable, we are at the end of segment
   100 			if (KillFirstBit2x64(F.m_new_td_bits) != 0) break;
   100 			if (KillFirstBit(F.m_new_td_bits) != TRACKDIR_BIT_NONE) break;
   101 
   101 
   102 			Trackdir new_td = (Trackdir)FindFirstBit2x64(F.m_new_td_bits);
   102 			Trackdir new_td = (Trackdir)FindFirstBit2x64(F.m_new_td_bits);
   103 
   103 
   104 			// stop if RV is on simple loop with no junctions
   104 			// stop if RV is on simple loop with no junctions
   105 			if (F.m_new_tile == n.m_key.m_tile && new_td == n.m_key.m_td) return false;
   105 			if (F.m_new_tile == n.m_key.m_tile && new_td == n.m_key.m_td) return false;