scores->num_entries = 0;
scores->last_added = -1;
scores->last_added_local = -1;
+
+ scores->updated = FALSE;
}
static void setScoreInfoToDefaults(void)
fclose(file);
SetFilePermissions(filename, PERMS_PRIVATE);
+
+ server_scores.updated = TRUE;
}
static void DownloadServerScoreToCache(int nr)
{
level_nr = mx;
+ if (server_scores.updated)
+ {
+ // reload scores, using updated server score cache file
+ LoadLocalAndServerScore(level_nr, FALSE);
+
+ server_scores.updated = FALSE;
+ }
+
first_entry = getHallOfFameFirstEntry(0, 0);
drawHallOfFameList(level_nr, first_entry);
DrawMainMenu();
}
}
+ else if (server_scores.updated)
+ {
+ // reload scores, using updated server score cache file
+ LoadLocalAndServerScore(level_nr, FALSE);
+
+ server_scores.updated = FALSE;
+
+ first_entry = getHallOfFameFirstEntry(0, 0);
+
+ drawHallOfFameList(level_nr, first_entry);
+ }
if (game_status == GAME_MODE_SCORES)
PlayMenuSoundIfLoop();