From: Holger Schemel Date: Fri, 18 Feb 2022 17:56:18 +0000 (+0100) Subject: merged code for reloading updated server scores X-Git-Tag: 4.3.2.0~117 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=8690e55ceeb74b13d867e3cdfb9ee991b58b297a;p=rocksndiamonds.git merged code for reloading updated server scores --- diff --git a/src/screens.c b/src/screens.c index de1c498f..bc28179a 100644 --- a/src/screens.c +++ b/src/screens.c @@ -5093,6 +5093,24 @@ static void HandleChooseTree(int mx, int my, int dx, int dy, int button, int num_page_entries = MIN(num_entries, NUM_MENU_ENTRIES_ON_SCREEN); boolean position_set_by_scrollbar = (dx == 999); + if (game_status == GAME_MODE_SCORES) + { + if (server_scores.updated) + { + // reload scores, using updated server score cache file + LoadLocalAndServerScore(scores.last_level_nr, FALSE); + + server_scores.updated = FALSE; + + if (button != MB_MENU_INITIALIZE) + { + ti = setHallOfFameActiveEntry(ti_ptr); + + drawChooseTreeScreen(ti); + } + } + } + if (button == MB_MENU_INITIALIZE) { int num_entries = numTreeInfoInGroup(ti); @@ -5103,14 +5121,6 @@ static void HandleChooseTree(int mx, int my, int dx, int dy, int button, if (game_status == GAME_MODE_SCORES) { - if (server_scores.updated) - { - // reload scores, using updated server score cache file - LoadLocalAndServerScore(scores.last_level_nr, FALSE); - - server_scores.updated = FALSE; - } - ti = setHallOfFameActiveEntry(ti_ptr); } else if (ti->cl_first == -1) @@ -5482,18 +5492,6 @@ static void HandleChooseTree(int mx, int my, int dx, int dy, int button, } } - if (game_status == GAME_MODE_SCORES && server_scores.updated) - { - // reload scores, using updated server score cache file - LoadLocalAndServerScore(scores.last_level_nr, FALSE); - - server_scores.updated = FALSE; - - ti = setHallOfFameActiveEntry(ti_ptr); - - drawChooseTreeScreen(ti); - } - if (game_status == GAME_MODE_SCORES) PlayMenuSoundIfLoop(); }