diff --git a/src/pc/cliopts.c b/src/pc/cliopts.c index 53f3358b..29aaf91c 100644 --- a/src/pc/cliopts.c +++ b/src/pc/cliopts.c @@ -26,6 +26,7 @@ static void print_help(void) { printf("--server PORT Starts the game and creates a new server on PORT.\n"); printf("--client IP PORT Starts the game and joins an existing server.\n"); printf("--playername PLAYERNAME Starts the game with a specific playername.\n"); + printf("--skip-update-check Skips the update check when loading the game.\n"); } static inline int arg_string(const char *name, const char *value, char *target, int maxLength) { @@ -80,6 +81,8 @@ bool parse_cli_opts(int argc, char* argv[]) { } } else if (!strcmp(argv[i], "--playername") && (i + 1) < argc) { arg_string("--playername", argv[++i], gCLIOpts.playerName, MAX_CONFIG_STRING); + } else if (!strcmp(argv[i], "--skip-update-check")) { + gCLIOpts.skipUpdateCheck = true; } else if (!strcmp(argv[i], "--help")) { print_help(); return false; diff --git a/src/pc/cliopts.h b/src/pc/cliopts.h index 88d03ccb..98b1abfb 100644 --- a/src/pc/cliopts.h +++ b/src/pc/cliopts.h @@ -26,6 +26,7 @@ struct CLIOptions { char joinIp[IP_MAX_LEN]; char playerName[MAX_CONFIG_STRING]; bool hideLoadingScreen; + bool skipUpdateCheck; }; extern struct CLIOptions gCLIOpts; diff --git a/src/pc/pc_main.c b/src/pc/pc_main.c index 1921aa2f..8c5139de 100644 --- a/src/pc/pc_main.c +++ b/src/pc/pc_main.c @@ -318,7 +318,7 @@ void* main_game_init(void* isThreaded) { enable_queued_dynos_packs(); sync_objects_init_system(); - if (gCLIOpts.network != NT_SERVER) { + if (gCLIOpts.network != NT_SERVER && !gCLIOpts.skipUpdateCheck) { check_for_updates(); }