kaiusl / KLPlugins.DynLeaderboards

ACC leaderboard plugin for SimHub
https://kaiusl.github.io/KLPlugins.DynLeaderboards/
MIT License
13 stars 1 forks source link

Wrong overall order when starting SimHub mid session #2

Closed kaiusl closed 2 years ago

kaiusl commented 2 years ago

When we start SimBub at the middle of session, some cars seem to get extra laps. This messes up overall ordering.

kaiusl commented 2 years ago

Mostly fixed but there is still a chance it could happen. On certain tracks (Silverstone, and some more) the laps counter updates before SplinePosition resets to zero. Thus if at startup the car is in just the right position, that it's lap counter has updated but SplinePosition hasn't reset then that car will gain a lap.

I'm currently not quite sure how to fix it.

kaiusl commented 2 years ago

First of all the issue comes from the fact that on some track start and finish lines are separate. At least on Silverstone the SplinePosition resets at start line whereas lap counter updates at finish line.

Now to solve the issue by checking if we are past the finish line and removing the extra lap.

Final remaining thing is to find and fix other tracks where this issue appears.

kaiusl commented 2 years ago

Also spa had this issue.

kaiusl commented 2 years ago

Now should be fixed.