|
|
@ -699,6 +699,10 @@ start_at:
|
|
|
|
// We are not driving into the tunnel, or it is an invalid tunnel
|
|
|
|
// We are not driving into the tunnel, or it is an invalid tunnel
|
|
|
|
continue;
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!HASBIT(tpf->railtypes, GetRailType(tile))) {
|
|
|
|
|
|
|
|
bits = 0;
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
}
|
|
|
|
flotr = FindLengthOfTunnel(tile, direction);
|
|
|
|
flotr = FindLengthOfTunnel(tile, direction);
|
|
|
|
si.cur_length += flotr.length * DIAG_FACTOR;
|
|
|
|
si.cur_length += flotr.length * DIAG_FACTOR;
|
|
|
|
tile = flotr.tile;
|
|
|
|
tile = flotr.tile;
|
|
|
@ -730,6 +734,12 @@ start_at:
|
|
|
|
// Check that the tile contains exactly one track
|
|
|
|
// Check that the tile contains exactly one track
|
|
|
|
if (bits == 0 || KILL_FIRST_BIT(bits) != 0) break;
|
|
|
|
if (bits == 0 || KILL_FIRST_BIT(bits) != 0) break;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if ((IsTileType(tile, MP_STREET) && !HASBIT(tpf->railtypes, GetRailTypeCrossing(tile))) ||
|
|
|
|
|
|
|
|
!HASBIT(tpf->railtypes, GetRailType(tile))) {
|
|
|
|
|
|
|
|
bits = 0;
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
///////////////////
|
|
|
|
///////////////////
|
|
|
|
// If we reach here, the tile has exactly one track.
|
|
|
|
// If we reach here, the tile has exactly one track.
|
|
|
|
// tile - index to a tile that is not rail tile, but still straight (with optional signals)
|
|
|
|
// tile - index to a tile that is not rail tile, but still straight (with optional signals)
|
|
|
|