Compare commits

...

2 Commits

Author SHA1 Message Date
Nicolas Gnyra ac5ad00674 Merge branch 'upload-score-sort-method' into 'master'
Check `sort_method` when comparing scores in `UploadLeaderboardScore`

See merge request Mr_Goldberg/goldberg_emulator!52
2023-09-26 03:41:56 +00:00
Nicolas Gnyra 6647317b88 Use `sort_method` when comparing scores in `UploadLeaderboardScore` 2023-09-25 23:10:04 -04:00
1 changed files with 3 additions and 1 deletions

View File

@ -1021,7 +1021,9 @@ SteamAPICall_t UploadLeaderboardScore( SteamLeaderboard_t hSteamLeaderboard, ELe
bool changed = false;
if (eLeaderboardUploadScoreMethod == k_ELeaderboardUploadScoreMethodKeepBest) {
if (leaderboards[hSteamLeaderboard - 1].self_score.score <= score.score) {
if (leaderboards[hSteamLeaderboard - 1].sort_method == k_ELeaderboardSortMethodAscending
? leaderboards[hSteamLeaderboard - 1].self_score.score >= score.score
: leaderboards[hSteamLeaderboard - 1].self_score.score <= score.score) {
leaderboards[hSteamLeaderboard - 1].self_score = score;
changed = true;
}