Skip to content

Commit 91a03af

Browse files
committed
Correct issue not recognising a crossover
1 parent 66f836c commit 91a03af

File tree

1 file changed

+9
-1
lines changed
  • Source/Orts.Simulation/Simulation/RollingStocks

1 file changed

+9
-1
lines changed

Source/Orts.Simulation/Simulation/RollingStocks/TrainCar.cs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3277,7 +3277,7 @@ public bool IsOverJunction()
32773277

32783278
// Trace.TraceInformation(" Track Section - Index {0} Ciruit Type {1}", thisSectionIndex, thisSection.CircuitType);
32793279

3280-
if (thisSection.CircuitType == TrackCircuitSection.TrackCircuitType.Junction || thisSection.CircuitType == TrackCircuitSection.TrackCircuitType.Crossover)
3280+
if (thisSection.CircuitType == TrackCircuitSection.TrackCircuitType.Junction)
32813281
{
32823282

32833283
// train is on a switch; let's see if car is on a switch too
@@ -3289,6 +3289,14 @@ public bool IsOverJunction()
32893289
return isOverJunction;
32903290
}
32913291
}
3292+
3293+
3294+
if (thisSection.CircuitType == TrackCircuitSection.TrackCircuitType.Crossover)
3295+
{
3296+
isOverJunction = true;
3297+
return isOverJunction;
3298+
}
3299+
32923300
}
32933301
}
32943302
catch

0 commit comments

Comments
 (0)