From ac313f1f1d595267f8e0a85db8e05a31cbd87a93 Mon Sep 17 00:00:00 2001 From: maj00r Date: Sun, 6 Sep 2026 15:23:50 +0200 Subject: [PATCH] Stop cutting the forward scan short at an occupied track. The check added to TableTraceRoute() decided consist membership through BelongsToConsist(), which falls back on TDynamicObject::is_connected() and its Next()/Prev() walk - the same pair that mishandles reversed members. When it failed to recognise one of our own cars the scan ended on our own consist, no signal ever reached the speed table, and the driver stood at a clear semaphore for good. Seen on a shunting locomotive that had just uncoupled, with ctOwner still cleared. The signal-permission code does not need it: OtherConsistAtSignal() looks the route over on its own and DistanceToAnotherConsist() measures to the vehicle rather than to the end of a track. Both stay. --- vehicle/Driver.cpp | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/vehicle/Driver.cpp b/vehicle/Driver.cpp index 7e53ce94..6424e1ff 100644 --- a/vehicle/Driver.cpp +++ b/vehicle/Driver.cpp @@ -744,16 +744,6 @@ void TController::TableTraceRoute(double fDistance, TDynamicObject *pVehicle) } } - auto const distancetotrackend{ fCurrentDistance + fTrackLength }; - // sign of the distance encodes the scanning direction (fLastDir < 0 = towards Point2) - if( distancetotrackend > 0.0 // the track still reaches ahead of us - && IsOccupiedByAnotherConsist( pTrack, distancetotrackend * ( fLastDir < 0.0 ? 1.0 : -1.0 ) ) ) { - // another consist stands here: it owns the signals beyond it, so we scan no further. The track - // stays in the table, marked checked - scanning resumes from the last entry, no dup control - tLast = pTrack; - break; - } - fCurrentDistance += fTrackLength; // doliczenie kolejnego odcinka do przeskanowanej długości tLast = pTrack; // odhaczenie, że sprawdzony fLastVel = pTrack->VelocityGet(); // prędkość na poprzednio sprawdzonym odcinku