@@ -3093,7 +3093,8 @@ private void AddVibrations(float factor)
30933093 }
30943094 #endregion
30953095
3096- public bool IsOverJunction { get ; private set ; }
3096+ public bool IsOverSwitch { get ; private set ; }
3097+ public bool IsOverCrossover { get ; private set ; }
30973098 public bool IsOverTrough { get ; private set ; }
30983099
30993100 void UpdatePositionFlags ( )
@@ -3107,7 +3108,8 @@ void UpdatePositionFlags()
31073108 rearOffsetM += Train . Cars [ i - 1 ] . CouplerSlackM + Train . Cars [ i - 1 ] . GetCouplerZeroLengthM ( ) + Train . Cars [ i ] . CarLengthM ;
31083109 var frontOffsetM = rearOffsetM + CarLengthM ;
31093110
3110- var isOverJunction = false ;
3111+ var isOverSwitch = false ;
3112+ var isOverCrossover = false ;
31113113 var isOverTrough = false ;
31123114
31133115 // Scan through the track sections forwards from the REAR of the train (`Train.PresentPosition[1]`),
@@ -3122,7 +3124,8 @@ void UpdatePositionFlags()
31223124 // Does this car overlap this track section?
31233125 if ( checkedM <= frontOffsetM && rearOffsetM <= checkedM + section . Length )
31243126 {
3125- if ( section . CircuitType == TrackCircuitSection . TrackCircuitType . Junction || section . CircuitType == TrackCircuitSection . TrackCircuitType . Crossover ) isOverJunction = true ;
3127+ if ( section . CircuitType == TrackCircuitSection . TrackCircuitType . Junction ) isOverSwitch = true ;
3128+ if ( section . CircuitType == TrackCircuitSection . TrackCircuitType . Crossover ) isOverCrossover = true ;
31263129 if ( section . TroughInfo != null )
31273130 {
31283131 foreach ( var troughs in section . TroughInfo )
@@ -3139,7 +3142,8 @@ void UpdatePositionFlags()
31393142 currentPin = nextPin ;
31403143 }
31413144
3142- IsOverJunction = isOverJunction ;
3145+ IsOverSwitch = isOverSwitch ;
3146+ IsOverCrossover = isOverCrossover ;
31433147 IsOverTrough = isOverTrough ;
31443148 }
31453149
0 commit comments