src/yapf/yapf_road.cpp
changeset 8329 77e50bd6ad67
parent 7866 e19fda04e8d3
child 9112 ec6800eaa340
equal deleted inserted replaced
8328:6909973c8359 8329:77e50bd6ad67
    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;