File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
Source/Orts.Simulation/Simulation/Timetables Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -10390,6 +10390,12 @@ public override void CheckStationTask()
10390
10390
// Get time
10391
10391
int eightHundredHours = 8 * 3600;
10392
10392
int sixteenHundredHours = 16 * 3600;
10393
+
10394
+ // Update delay if train might be running late, do not update if train is early and waiting at station
10395
+ if (presentTime > StationStops[0].DepartTime)
10396
+ {
10397
+ Delay = TimeSpan.FromSeconds((presentTime - StationStops[0].DepartTime) % (24 * 3600));
10398
+ }
10393
10399
10394
10400
// If moving, set departed
10395
10401
if (Math.Abs(SpeedMpS) > 1.0f)
@@ -10399,6 +10405,7 @@ public override void CheckStationTask()
10399
10405
AtStation = false;
10400
10406
MayDepart = false;
10401
10407
DisplayMessage = "";
10408
+ // Update delay when departing, train may now be early
10402
10409
if (StationStops[0].ArrivalTime >= 0)
10403
10410
{
10404
10411
Delay = TimeSpan.FromSeconds((presentTime - StationStops[0].DepartTime) % (24 * 3600));
You can’t perform that action at this time.
0 commit comments