Tracerestrict: Fix PBS entry signal conditional with signalled tunnel/bridges

This commit is contained in:
Jonathan G Rennison
2021-05-26 01:26:28 +01:00
parent 0579c8755c
commit c0bf8476b1

View File

@@ -241,6 +241,16 @@ private:
} }
} }
if (IsTileType(tile, MP_TUNNELBRIDGE) && IsTunnelBridgeSignalSimulationExit(tile) && TrackdirExitsTunnelBridge(tile, trackdir)) {
if (IsTunnelBridgeEffectivelyPBS(tile)) {
// found PBS signal
candidate_tile = tile;
} else {
// wrong type of signal
candidate_tile = INVALID_TILE;
}
}
if (tile == origin_tile && trackdir == origin_trackdir) { if (tile == origin_tile && trackdir == origin_trackdir) {
// reached pathfinder origin // reached pathfinder origin
return candidate_tile; return candidate_tile;