File tree 2 files changed +16
-3
lines changed
2 files changed +16
-3
lines changed Original file line number Diff line number Diff line change @@ -34,6 +34,7 @@ public enum Event
34
34
PlayerTrainHelperLoco ,
35
35
PlayerTrainLeadLoco ,
36
36
StaticTrainLoco ,
37
+ EndAITrainLeadLoco ,
37
38
BatterySwitchOff ,
38
39
BatterySwitchOn ,
39
40
BatterySwitchCommandOff ,
@@ -576,6 +577,7 @@ public static Event From(Source source, int eventID)
576
577
case 334 : return Event . AITrainApproachingStation ;
577
578
case 335 : return Event . AITrainLeavingStation ;
578
579
case 336 : return Event . StaticTrainLoco ;
580
+ case 337 : return Event . EndAITrainLeadLoco ;
579
581
580
582
default : return 0 ;
581
583
}
Original file line number Diff line number Diff line change @@ -13849,7 +13849,11 @@ public void RedefineAITriggers()
13849
13849
car.SignalEvent(Event.AITrainLeadLoco);
13850
13850
leadFound = true;
13851
13851
}
13852
- else car.SignalEvent(Event.AITrainHelperLoco);
13852
+ else
13853
+ {
13854
+ car.SignalEvent(Event.AITrainHelperLoco);
13855
+ car.SignalEvent(Event.EndAITrainLeadLoco);
13856
+ }
13853
13857
}
13854
13858
}
13855
13859
}
@@ -13863,9 +13867,13 @@ public void RedefinePlayerTrainTriggers()
13863
13867
Simulator.PlayerLocomotive.SignalEvent(Event.PlayerTrainLeadLoco);
13864
13868
foreach (var car in Cars)
13865
13869
{
13866
- if (car is MSTSLocomotive && car != Simulator.PlayerLocomotive )
13870
+ if (car is MSTSLocomotive)
13867
13871
{
13868
- car.SignalEvent(Event.PlayerTrainHelperLoco);
13872
+ if (car != Simulator.PlayerLocomotive)
13873
+ {
13874
+ car.SignalEvent(Event.PlayerTrainHelperLoco);
13875
+ }
13876
+ car.SignalEvent(Event.EndAITrainLeadLoco);
13869
13877
}
13870
13878
}
13871
13879
}
@@ -13879,7 +13887,10 @@ public void RedefineStaticTrainTriggers()
13879
13887
foreach (var car in Cars)
13880
13888
{
13881
13889
if (car is MSTSLocomotive)
13890
+ {
13882
13891
car.SignalEvent(Event.StaticTrainLoco);
13892
+ car.SignalEvent(Event.EndAITrainLeadLoco);
13893
+ }
13883
13894
}
13884
13895
}
13885
13896
You can’t perform that action at this time.
0 commit comments