Properly Populate Player Index

The player_index field in question is ultimately what gets used to determine which ranks get displayed in the leaderboards chart, and because this was missing the chart was simply displaying the top four results no matter what.
This commit is contained in:
LillyJadeKatrin 2024-07-17 22:53:15 -04:00
parent 5ccd157c94
commit 8bb2f98c6a
1 changed files with 2 additions and 0 deletions

View File

@ -804,6 +804,8 @@ void AchievementManager::LeaderboardEntriesCallback(int result, const char* erro
map_entry.username.assign(response_entry.user);
memcpy(map_entry.score.data(), response_entry.display, FORMAT_SIZE);
map_entry.rank = response_entry.rank;
if (ix == list->user_index)
leaderboard.player_index = response_entry.rank;
}
AchievementManager::GetInstance().m_update_callback({.leaderboards = {*leaderboard_id}});
}