projects
/
rocksndiamonds.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
7530e22
)
merged code for reloading updated server scores
author
Holger Schemel
<info@artsoft.org>
Fri, 18 Feb 2022 17:56:18 +0000
(18:56 +0100)
committer
Holger Schemel
<info@artsoft.org>
Fri, 18 Feb 2022 17:56:18 +0000
(18:56 +0100)
src/screens.c
patch
|
blob
|
history
diff --git
a/src/screens.c
b/src/screens.c
index de1c498f3535df62e0317d2965ddc8d1503985e4..bc28179a3aab1d3db5fb0136dcff3f19873ad866 100644
(file)
--- 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);
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);
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 (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)
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();
}
if (game_status == GAME_MODE_SCORES)
PlayMenuSoundIfLoop();
}