From: Holger Schemel Date: Sun, 6 Feb 2022 14:42:45 +0000 (+0100) Subject: added using server score if higher than (potentially truncated) local score X-Git-Tag: 4.3.1.1~7 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=40c993b878e667d83c595d68d4f8d2e1f3839ef1;p=rocksndiamonds.git added using server score if higher than (potentially truncated) local score --- diff --git a/src/game.c b/src/game.c index 43a0b8c2..defb1d08 100644 --- a/src/game.c +++ b/src/game.c @@ -5094,7 +5094,14 @@ static int addScoreEntry(struct ScoreInfo *list, struct ScoreEntry *new_entry, // (special case: historic score entries have an empty tape basename entry) if (strEqual(new_entry->tape_basename, entry->tape_basename) && !strEqual(new_entry->tape_basename, UNDEFINED_FILENAME)) + { + // special case: use server score instead of local score value if higher + // (historic scores might have been truncated to 16-bit values locally) + if (score_is_better) + entry->score = new_entry->score; + return -1; + } if (is_better || entry_is_empty) {