src/pathfind.cpp
changeset 6172 e6d7a5b3d63f
parent 6012 065d7234a7a9
child 6248 e4a2ed7e5613
equal deleted inserted replaced
6171:fb9997933c24 6172:e6d7a5b3d63f
   784 				bits = TrackdirBitsToTrackBits((TrackdirBits)(ts & TRACKDIR_BIT_MASK));
   784 				bits = TrackdirBitsToTrackBits((TrackdirBits)(ts & TRACKDIR_BIT_MASK));
   785 
   785 
   786 				// Check that the tile contains exactly one track
   786 				// Check that the tile contains exactly one track
   787 				if (bits == 0 || KILL_FIRST_BIT(bits) != 0) break;
   787 				if (bits == 0 || KILL_FIRST_BIT(bits) != 0) break;
   788 
   788 
   789 				if (!HASBIT(tpf->railtypes, IsTileType(tile, MP_STREET) ? GetRailTypeCrossing(tile) : GetRailType(tile))) {
   789 				if (!HASBIT(tpf->railtypes, GetRailType(tile))) {
   790 					bits = TRACK_BIT_NONE;
   790 					bits = TRACK_BIT_NONE;
   791 					break;
   791 					break;
   792 				}
   792 				}
   793 
   793 
   794 				///////////////////
   794 				///////////////////