@@ -83,7 +83,6 @@ public class TrainCarOperationsWindow : Window
8383 public int SeparatorCount ;
8484 public int SpacerRowCount ;
8585 public int SymbolsRowCount ;
86- public bool BrakeHoseCarCoupling ;
8786
8887 public ControlLayout Client ;
8988 public bool CarPositionChanged ;
@@ -500,8 +499,6 @@ void AddSpace()
500499 // Allows to resize the window according to the carPosition value.
501500 if ( RowsCount > carPosition ) RowsCount = carPosition ;
502501 if ( SeparatorCount > carPosition - 1 ) SeparatorCount = carPosition - 1 ;
503-
504- BrakeHoseCarCoupling = false ; // All brake hoses checked
505502 }
506503 }
507504 return Vbox ;
@@ -606,11 +603,6 @@ public override void PrepareFrame(ElapsedTime elapsedTime, bool updateFull)
606603 PlayerTrain = Owner . Viewer . PlayerTrain ;
607604 if ( LastPlayerTrainCars != Owner . Viewer . PlayerTrain . Cars . Count || ! LayoutUpdated )
608605 {
609- // Updates brake hoses
610- if ( LastPlayerTrainCars > 0 && PlayerTrain . Cars . Count > LastPlayerTrainCars && ( ( PlayerTrain . Cars [ LastPlayerTrainCars ] as MSTSWagon ) . BrakeSystem . FrontBrakeHoseConnected != ( PlayerTrain . Cars [ LastPlayerTrainCars - 1 ] as MSTSWagon ) . BrakeSystem . RearBrakeHoseConnected ) )
611- {
612- BrakeHoseCarCoupling = true ; // Enable to check all brake hoses when coupling cars
613- }
614606 LayoutUpdated = true ;
615607 Layout ( ) ;
616608 localScrollLayout ( SelectedCarPosition ) ;
@@ -846,25 +838,10 @@ public buttonFrontBrakeHose(int x, int y, int size, Viewer viewer, TrainCar car,
846838 {
847839 Viewer = viewer ;
848840 TrainCarViewer = Viewer . TrainCarOperationsViewerWindow ;
849- TrainCarOperations = Viewer . TrainCarOperationsWindow ;
850841 CarOperations = Viewer . CarOperationsWindow ;
851- var PlayerTrain = Viewer . PlayerTrain ;
852842
853843 CarPosition = carPosition ;
854844 First = car == viewer . PlayerTrain . Cars . First ( ) ;
855- if ( CarPosition > 0 && TrainCarOperations . BrakeHoseCarCoupling )
856- { // Sometimes when coupling cars. The front brake hose of the new car and the brake hose of the previous car are not synchronised.
857- var frontBrakeHoseCurrentCar = ( PlayerTrain . Cars [ CarPosition ] as MSTSWagon ) . BrakeSystem . FrontBrakeHoseConnected ;
858- var rearBrakeHosePreviousCar = ( PlayerTrain . Cars [ CarPosition - 1 ] as MSTSWagon ) . BrakeSystem . RearBrakeHoseConnected ;
859- if ( frontBrakeHoseCurrentCar && ! rearBrakeHosePreviousCar )
860- {
861- new WagonBrakeHoseConnectCommand ( Viewer . Log , ( PlayerTrain . Cars [ CarPosition ] as MSTSWagon ) , ! ( PlayerTrain . Cars [ CarPosition ] as MSTSWagon ) . BrakeSystem . FrontBrakeHoseConnected ) ;
862- }
863- else if ( ! frontBrakeHoseCurrentCar && rearBrakeHosePreviousCar )
864- {
865- new WagonBrakeHoseRearConnectCommand ( Viewer . Log , ( PlayerTrain . Cars [ CarPosition - 1 ] as MSTSWagon ) , ! ( PlayerTrain . Cars [ CarPosition - 1 ] as MSTSWagon ) . BrakeSystem . RearBrakeHoseConnected ) ;
866- }
867- }
868845 Texture = First ? BrakeHoseFirstDis : ( viewer . PlayerTrain . Cars [ carPosition ] as MSTSWagon ) . BrakeSystem . FrontBrakeHoseConnected ? BrakeHoseCon : BrakeHoseDis ;
869846
870847 // Allows compatibility with CarOperationWindow
0 commit comments