From 5edb080deb57a84669bd6c5c2e84a75d40b582f8 Mon Sep 17 00:00:00 2001 From: Jonathan G Rennison Date: Wed, 14 Oct 2020 02:15:51 +0100 Subject: [PATCH] Fix PBS detection outwards from PBS tunnel/bridge exit --- src/signal.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/signal.cpp b/src/signal.cpp index 293e311a64..b9d03d64da 100644 --- a/src/signal.cpp +++ b/src/signal.cpp @@ -633,8 +633,11 @@ static SigSegState UpdateSignalsInBuffer(Owner owner) if (IsTunnel(tile)) assert(dir == INVALID_DIAGDIR || dir == ReverseDiagDir(GetTunnelBridgeDirection(tile))); TrackBits across = GetAcrossTunnelBridgeTrackBits(tile); if (dir == INVALID_DIAGDIR || _enterdir_to_trackbits[dir] & across) { - _tbdset.Add(tile, INVALID_DIAGDIR); // we can safely start from wormhole centre - if (!IsTunnelBridgeWithSignalSimulation(tile)) { // Don't worry with other side of tunnel. + if (IsTunnelBridgeWithSignalSimulation(tile)) { + /* Don't worry about other side of tunnel. */ + _tbdset.Add(tile, dir); + } else { + _tbdset.Add(tile, INVALID_DIAGDIR); // we can safely start from wormhole centre _tbdset.Add(GetOtherTunnelBridgeEnd(tile), INVALID_DIAGDIR); } break;