@@ -1357,6 +1357,7 @@ public override void HandleMsg() //only client will get message, thus will set s
13571357 train . InitializeBrakes ( ) ;
13581358 //train.InitializeSignals(false);//client do it won't have impact
13591359 train . CheckFreight ( ) ;
1360+ train . SetDPUnitIDs ( ) ;
13601361 bool canPlace = true ;
13611362 Train . TCSubpathRoute tempRoute = train . CalculateInitialTrainPosition ( ref canPlace ) ;
13621363
@@ -1567,6 +1568,7 @@ public override void HandleMsg() //only client will get message, thus will set s
15671568 train . CalculatePositionOfCars ( ) ;
15681569 train . travelled = Travelled ;
15691570 train . CheckFreight ( ) ;
1571+ train . SetDPUnitIDs ( ) ;
15701572 return ;
15711573 }
15721574 train1 . TrainType = Train . TRAINTYPE . REMOTE ;
@@ -1601,6 +1603,7 @@ public override void HandleMsg() //only client will get message, thus will set s
16011603 train1 . InitializeBrakes ( ) ;
16021604 //train1.InitializeSignals(false);
16031605 train1 . CheckFreight ( ) ;
1606+ train1 . SetDPUnitIDs ( ) ;
16041607 bool canPlace = true ;
16051608 Train . TCSubpathRoute tempRoute = train1 . CalculateInitialTrainPosition ( ref canPlace ) ;
16061609
@@ -2621,6 +2624,7 @@ public override void HandleMsg()
26212624 t . MUDirection = ( Direction ) mDirection1 ;
26222625 train . ControlMode = Train . TRAIN_CONTROL . EXPLORER ;
26232626 train . CheckFreight ( ) ;
2627+ train . SetDPUnitIDs ( ) ;
26242628 train . InitializeBrakes ( ) ;
26252629 canPlace = true ;
26262630 tempRoute = train . CalculateInitialTrainPosition ( ref canPlace ) ;
@@ -2671,6 +2675,7 @@ public override void HandleMsg()
26712675 train2 . LeadLocomotive = null ;
26722676 train2 . LeadNextLocomotive ( ) ;
26732677 train2 . CheckFreight ( ) ;
2678+ train2 . SetDPUnitIDs ( ) ;
26742679
26752680 //train2 may contain myself, and no other players, thus will make myself controlling this train
26762681 /*if (train2.Cars.Contains(MPManager.Simulator.PlayerLocomotive))
@@ -2693,6 +2698,7 @@ public override void HandleMsg()
26932698 train2 . MUDirection = ( Direction ) mDirection2 ;
26942699 train2 . ControlMode = Train . TRAIN_CONTROL . EXPLORER ;
26952700 train2 . CheckFreight ( ) ;
2701+ train2 . SetDPUnitIDs ( ) ;
26962702 train2 . InitializeBrakes ( ) ;
26972703 canPlace = true ;
26982704 tempRoute = train2 . CalculateInitialTrainPosition ( ref canPlace ) ;
@@ -2967,6 +2973,7 @@ public override void HandleMsg()
29672973 train . MUDirection = ( Direction ) mDirection ;
29682974 train . RearTDBTraveller = new Traveller ( MPManager . Simulator . TSectionDat , MPManager . Simulator . TDB . TrackDB . TrackNodes , TileX , TileZ , X , Z , direction == 0 ? Traveller . TravellerDirection . Forward : Traveller . TravellerDirection . Backward ) ;
29692975 train . CheckFreight ( ) ;
2976+ train . SetDPUnitIDs ( ) ;
29702977 train . CalculatePositionOfCars ( ) ;
29712978 train . LeadLocomotive = null ; train2 . LeadLocomotive = null ;
29722979 if ( Lead != - 1 && Lead < train . Cars . Count ) train . LeadLocomotive = train . Cars [ Lead ] ;
0 commit comments