eckhchri / pcars-ds-liveview

Provides a html page for project cars dedicated server and display a map of the current race.
14 stars 1 forks source link

Same Track ID in different games #170

Open viper4gh opened 3 years ago

viper4gh commented 3 years ago

The new AMS2 Tracks Daytona Road Course and Long Beach using the same Track IDs as in pcars2.

The tracktable is showing only one of them and in the API modes CREST2-AMS2 and DS-AMS2 the correct trackmap is loaded, but the refpoint from pcars2 is used. If you further click on another track in the tracktable, click then the same track again, the map returns back to the active running track. And then the app tries to load the pcars2 trackmap.

Related to #153

viper4gh commented 3 years ago

Problem is aRefPointTMPAll, which is a merged Object from all refpoints of all games and a TrackID can exist only one time.

RefPoint.js line 17: this.refPointsAll = this._mergeDataObjects(); // all refpoints in one merged object, if duplicates only one can be in there

viper4gh commented 3 years ago

For a solution the Index in the aRefPointTMPAll object must be something like a combination of game and Track ID: cuircitIDUnique = gameName + '-'+ cuircitID;