-
Notifications
You must be signed in to change notification settings - Fork 6
Player Merges
As people clean and reinstall their installations of Xonotic, or use installations of Xonotic on different machines, they create multiple player records. This is because the unique key - called the hashkey - differs from what it was before. On the front end of XonStat, however, these different players appear to be duplicates because oftentimes they have the same player names. To resolve this issue I created a merge procedure that will combine two player accounts so further games played on either installation will resolve to the same player record.
Here's what happens during a merge:
-
The older of the two player ids is considered the "winner" of the transaction. This is the account that will be associated with all installations after the merge. I chose this because the older record more accurately reflects when the player started collecting statistics.
-
All weapon statistics under the newer player_id will be moved to the older player_id.
-
All game statistics under the newer player_id will be moved to the older player_id.
-
Elo records that the new player_id has but the old player_id didn't will be moved to the new player_id.
-
All Elo records will be set to the highest value between the two player records.
-
All hashkeys will be moved to the old player_id. This creates a one to many linkage between the player account and the hashkeys, which means that the player can play with either hashkey and will be resolved to just one player record.