@@ -4419,6 +4419,8 @@ public void CoupleAI(Train attachTrain, bool thisTrainFront, bool attachTrainFro
4419
4419
Cars . Clear ( ) ;
4420
4420
attachTrain . Length += Length ;
4421
4421
4422
+ attachTrain . ReinitializeEOT ( ) ;
4423
+
4422
4424
// recalculate position of formed train
4423
4425
if ( attachTrainFront ) // coupled to front, so rear position is still valid
4424
4426
{
@@ -4447,7 +4449,6 @@ public void CoupleAI(Train attachTrain, bool thisTrainFront, bool attachTrainFro
4447
4449
// set various items
4448
4450
attachTrain . CheckFreight ( ) ;
4449
4451
attachTrain . SetDPUnitIDs ( ) ;
4450
- attachTrain . ReinitializeEOT ( ) ;
4451
4452
attachTrain . activityClearingDistanceM = attachTrain . Cars . Count < standardTrainMinCarNo ? shortClearingDistanceM : standardClearingDistanceM ;
4452
4453
attachCar . SignalEvent ( Event . Couple ) ;
4453
4454
@@ -4533,6 +4534,8 @@ public void CoupleAIToStatic(Train attachTrain, bool thisTrainFront, bool attach
4533
4534
Length += attachTrain . Length ;
4534
4535
attachTrain . Cars . Clear ( ) ;
4535
4536
4537
+ ReinitializeEOT ( ) ;
4538
+
4536
4539
// recalculate position of formed train
4537
4540
if ( thisTrainFront ) // coupled to front, so rear position is still valid
4538
4541
{
@@ -4581,7 +4584,6 @@ public void CoupleAIToStatic(Train attachTrain, bool thisTrainFront, bool attach
4581
4584
UpdateOccupancies ( ) ;
4582
4585
AddTrackSections ( ) ;
4583
4586
ResetActions ( true ) ;
4584
- ReinitializeEOT ( ) ;
4585
4587
physicsUpdate ( 0 ) ;
4586
4588
4587
4589
}
@@ -4749,6 +4751,8 @@ public void TerminateCoupling(Train attachTrain, bool thisTrainFront, bool attac
4749
4751
UncoupledFrom = attachTrain ;
4750
4752
attachTrain . UncoupledFrom = this ;
4751
4753
4754
+ ReinitializeEOT ( ) ;
4755
+ attachTrain . ReinitializeEOT ( ) ;
4752
4756
4753
4757
// recalculate position of coupling train
4754
4758
if ( thisTrainFront ) // coupled to front, so rear position is still valid
@@ -4809,11 +4813,9 @@ public void TerminateCoupling(Train attachTrain, bool thisTrainFront, bool attac
4809
4813
// set various items
4810
4814
CheckFreight ( ) ;
4811
4815
SetDPUnitIDs ( ) ;
4812
- ReinitializeEOT ( ) ;
4813
4816
activityClearingDistanceM = Cars . Count < standardTrainMinCarNo ? shortClearingDistanceM : standardClearingDistanceM ;
4814
4817
attachTrain . CheckFreight ( ) ;
4815
4818
attachTrain . SetDPUnitIDs ( ) ;
4816
- attachTrain . ReinitializeEOT ( ) ;
4817
4819
attachTrain . activityClearingDistanceM = attachTrain . Cars . Count < standardTrainMinCarNo ? shortClearingDistanceM : standardClearingDistanceM ;
4818
4820
// anticipate reversal point and remove active action
4819
4821
TCRoute . ReversalInfo [ TCRoute . activeSubpath ] . ReverseReversalOffset = Math . Max ( PresentPosition [ 0 ] . TCOffset - 10f , 0.3f ) ;
0 commit comments