aboutsummaryrefslogtreecommitdiff
path: root/src/client/clientlauncher.cpp
diff options
context:
space:
mode:
authorSmallJoker <SmallJoker@users.noreply.github.com>2020-07-29 23:20:01 +0200
committerGitHub <noreply@github.com>2020-07-29 23:20:01 +0200
commite5725dfb8e476a5a6f63f020a23a53ca3ef610e9 (patch)
tree8bacc9d5fd2bb8c281111e09dbe7e166a55705a9 /src/client/clientlauncher.cpp
parent470f32821627a56b682ea1947ab5a50ef57c1c10 (diff)
downloadminetest-e5725dfb8e476a5a6f63f020a23a53ca3ef610e9.tar.gz
minetest-e5725dfb8e476a5a6f63f020a23a53ca3ef610e9.tar.bz2
minetest-e5725dfb8e476a5a6f63f020a23a53ca3ef610e9.zip
Allow starting local server using --go again (#10229)
Diffstat (limited to 'src/client/clientlauncher.cpp')
-rw-r--r--src/client/clientlauncher.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/client/clientlauncher.cpp b/src/client/clientlauncher.cpp
index ce16797e6..29427f609 100644
--- a/src/client/clientlauncher.cpp
+++ b/src/client/clientlauncher.cpp
@@ -327,13 +327,13 @@ void ClientLauncher::init_args(GameStartData &start_data, const Settings &cmd_ar
// Join a remote server
start_data.address = cmd_args.get("address");
start_data.world_path.clear();
+ start_data.name = g_settings->get("name");
}
if (!start_data.world_path.empty()) {
// Start a singleplayer instance
start_data.address = "";
}
- start_data.name = g_settings->get("name");
if (cmd_args.exists("name"))
start_data.name = cmd_args.get("name");
@@ -419,7 +419,6 @@ bool ClientLauncher::launch_game(std::string &error_message,
/* Show the GUI menu
*/
std::string server_name, server_description;
- start_data.local_server = false;
if (!skip_main_menu) {
// Initialize menu data
// TODO: Re-use existing structs (GameStartData)
@@ -467,6 +466,9 @@ bool ClientLauncher::launch_game(std::string &error_message,
start_data.local_server = !menudata.simple_singleplayer_mode &&
start_data.address.empty();
+ } else {
+ start_data.local_server = !start_data.world_path.empty() &&
+ start_data.address.empty() && !start_data.name.empty();
}
if (!RenderingEngine::run())