mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-01-22 15:11:54 +00:00
(svn r4964) - Fix NTP over bridges: don't check the rail type when on a bridge
This commit is contained in:
parent
ae8f4f8d9a
commit
ef8eaf3f39
10
pathfind.c
10
pathfind.c
@ -734,9 +734,13 @@ 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;
|
||||
/* Check the rail type only if the train is *NOT* on top of
|
||||
* a bridge. */
|
||||
if (!(IsBridgeTile(tile) && IsBridgeMiddle(tile) && GetBridgeAxis(tile) == DiagDirToAxis(direction))) {
|
||||
if (IsTileType(tile, MP_STREET) ? !HASBIT(tpf->railtypes, GetRailTypeCrossing(tile)) : !HASBIT(tpf->railtypes, GetRailType(tile))) {
|
||||
bits = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
///////////////////
|
||||
|
Loading…
Reference in New Issue
Block a user