From: Holger Schemel Date: Fri, 14 May 2021 16:14:32 +0000 (+0200) Subject: added setup option to force showing local scores only X-Git-Tag: 4.3.0.0~150 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=9bbc42c66f07e770752e643c0ee4cacec95780d3;p=rocksndiamonds.git added setup option to force showing local scores only --- diff --git a/src/files.c b/src/files.c index 51e674cd..f3bf9f75 100644 --- a/src/files.c +++ b/src/files.c @@ -9318,7 +9318,7 @@ void LoadLocalAndServerScore(int nr, boolean download_score) // restore last added local score entry (before merging server scores) scores.last_added = scores.last_added_local = last_added_local; - if (setup.api_server) + if (setup.api_server && !setup.only_show_local_scores) { // load server scores from cache file and trigger update from server LoadServerScore(nr, download_score); @@ -9514,6 +9514,10 @@ static struct TokenInfo global_setup_tokens[] = TYPE_SWITCH, &setup.show_snapshot_buttons, "show_snapshot_buttons" }, + { + TYPE_SWITCH, + &setup.only_show_local_scores, "only_show_local_scores" + }, { TYPE_STRING, &setup.graphics_set, "graphics_set" @@ -10186,6 +10190,7 @@ static void setSetupInfoToDefaults(struct SetupInfo *si) si->sp_show_border_elements = FALSE; si->small_game_graphics = FALSE; si->show_snapshot_buttons = FALSE; + si->only_show_local_scores = FALSE; si->graphics_set = getStringCopy(GFX_CLASSIC_SUBDIR); si->sounds_set = getStringCopy(SND_CLASSIC_SUBDIR); diff --git a/src/libgame/system.h b/src/libgame/system.h index 94ebe7a5..77c6c367 100644 --- a/src/libgame/system.h +++ b/src/libgame/system.h @@ -1482,6 +1482,7 @@ struct SetupInfo boolean sp_show_border_elements; boolean small_game_graphics; boolean show_snapshot_buttons; + boolean only_show_local_scores; char *graphics_set; char *sounds_set; diff --git a/src/screens.c b/src/screens.c index 4bd24b50..83b91dc4 100644 --- a/src/screens.c +++ b/src/screens.c @@ -6759,6 +6759,7 @@ static struct TokenInfo setup_info_game[] = { TYPE_TEXT_INPUT, execGadgetNetworkServer, "Network Server Hostname:" }, { TYPE_STRING, &network_server_text, "" }, { TYPE_SWITCH, &setup.api_server, "Use Highscore Server:" }, + { TYPE_SWITCH, &setup.only_show_local_scores, "Only Show Local Scores:" }, { TYPE_SWITCH, &setup.multiple_users, "Multiple Users/Teams:" }, { TYPE_YES_NO, &setup.input_on_focus, "Only Move Focussed Player:" }, { TYPE_SWITCH, &setup.time_limit, "Time Limit:" },