mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-06 14:27:16 +00:00
(svn r4812) -Fix (FS#161) NTP properly checks for railtypes on non-plain-rail-tiles (Rubidium)
This commit is contained in:
parent
d2fc3431a1
commit
3c6c3895cf
10
pathfind.c
10
pathfind.c
@ -699,6 +699,10 @@ start_at:
|
||||
// We are not driving into the tunnel, or it is an invalid tunnel
|
||||
continue;
|
||||
}
|
||||
if (!HASBIT(tpf->railtypes, GetRailType(tile))) {
|
||||
bits = 0;
|
||||
break;
|
||||
}
|
||||
flotr = FindLengthOfTunnel(tile, direction);
|
||||
si.cur_length += flotr.length * DIAG_FACTOR;
|
||||
tile = flotr.tile;
|
||||
@ -730,6 +734,12 @@ start_at:
|
||||
// Check that the tile contains exactly one track
|
||||
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.
|
||||
// tile - index to a tile that is not rail tile, but still straight (with optional signals)
|
||||
|
Loading…
Reference in New Issue
Block a user