Skip to content

Commit 443fc13

Browse files
committed
Get correct signal id if signal is ahead in same Track Circuit
1 parent ef8a553 commit 443fc13

File tree

1 file changed

+12
-0
lines changed
  • Source/Orts.Simulation/Simulation/Signalling

1 file changed

+12
-0
lines changed

Source/Orts.Simulation/Simulation/Signalling/Signals.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9759,6 +9759,18 @@ public int SONextSignal(int fntype)
97599759
else
97609760
{
97619761
thisSection = signalRef.TrackCircuitList[thisTC];
9762+
if (!isSignalNormal())
9763+
{
9764+
TrackCircuitSignalList thisList = thisSection.CircuitItems.TrackCircuitSignals[direction][reqtype];
9765+
foreach (var item in thisList.TrackCircuitItem)
9766+
{
9767+
if (item.SignalRef.TCOffset > TCOffset)
9768+
{
9769+
signalFound = item.SignalRef.thisRef;
9770+
break;
9771+
}
9772+
}
9773+
}
97629774
sectionSet = enabledTrain == null ? false : thisSection.IsSet(enabledTrain, false);
97639775

97649776
if (sectionSet)

0 commit comments

Comments
 (0)