mirror of
https://github.com/MaSzyna-EU07/StarterNG.git
synced 2026-11-19 15:02:15 +01:00
Read the last run's log before a start has to
A start notes down which vehicles the player drove in the run before, as the log begins anew. With the tape window never opened nothing of a long run's log had been read yet, and Start waited on the whole of it. It is now read off the UI thread when the simulator exits and when the starter opens.
This commit is contained in:
@@ -113,6 +113,17 @@ public sealed class HaslerTapes
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Reads what the log of the last launch has gained since the last look. A start
|
||||
/// notes that down before the log begins anew, and after a long run, with nothing
|
||||
/// read of it yet, it would wait on the whole log.
|
||||
/// </summary>
|
||||
public void FollowLastRun()
|
||||
{
|
||||
if (Launches().LastOrDefault() is { } launch)
|
||||
PlayerIn(launch);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The launches noted so far, oldest first. Read again only when the file has
|
||||
/// changed: this runs every few seconds next to a running simulator.
|
||||
|
||||
Reference in New Issue
Block a user