RiddleTime / Race-Element

Solutions for Sim Racing
https://race.elementfuture.com
GNU General Public License v3.0
77 stars 17 forks source link

CornerDataOverlay misfunction when I restart current lap by returning to garage #153

Open lchannng opened 6 months ago

lchannng commented 6 months ago

Duplicated corner number will add to CornerData afer returning to garage.

https://github.com/RiddleTime/Race-Element/blob/aa9c4ba2b742d3ef5ba5b19e65e84d8f874a3a3b/Race_Element.HUD.ACC/Overlays/Driving/CornerData/CornerDataOverlay.cs#L158

Simply override _bestLapCorners with the latest version wil fix this issuse. _bestLapCorners[data.CornerNumber] = data;

lchannng commented 5 months ago

https://github.com/RiddleTime/Race-Element/blob/f1b530e1aa7cd2df44dadd813ed34f2e7145ec68/Race_Element.HUD.ACC/Overlays/Driving/CornerData/CornerDataOverlay.cs#L151

In addition,it should take the last n corners. var cornerData = _cornerDatas.TakeLast(maxCornerCount);

RiddleTime commented 5 months ago

Will have a look soon, thanks for the repory!

RiddleTime commented 4 months ago

@lchannng do you want to create a pull request to fix this? (sorry, but my time is limited in some cases and I'm working on a lot of other matter within the application).

The Corner Data HUD itself needs a redesign as well to fit the Lap Table HUD's design. Would you like to look into that?