aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorred-001 <red-001@outlook.ie>2017-02-15 19:14:31 +0000
committersfan5 <sfan5@live.de>2017-02-16 12:59:19 +0100
commit2dcbc019044b1af22e056c5bdb586f94c83092ad (patch)
tree7ef01eddba2b571d854bdd07acda672ca8a2899e /src
parenta5e4273575c7a82459c4f9025ee19ee57eed4698 (diff)
downloadminetest-2dcbc019044b1af22e056c5bdb586f94c83092ad.tar.gz
minetest-2dcbc019044b1af22e056c5bdb586f94c83092ad.tar.bz2
minetest-2dcbc019044b1af22e056c5bdb586f94c83092ad.zip
Fix a small regression caused by e2ad76f.
Diffstat (limited to 'src')
-rw-r--r--src/client/clientlauncher.cpp19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/client/clientlauncher.cpp b/src/client/clientlauncher.cpp
index 1ac67a1de..2adac53c2 100644
--- a/src/client/clientlauncher.cpp
+++ b/src/client/clientlauncher.cpp
@@ -411,8 +411,6 @@ bool ClientLauncher::launch_game(std::string &error_message,
playername = menudata.name;
password = menudata.password;
- g_settings->set("name", playername);
-
current_playername = playername;
current_password = password;
current_address = address;
@@ -425,13 +423,16 @@ bool ClientLauncher::launch_game(std::string &error_message,
current_password = "";
current_address = "";
current_port = myrand_range(49152, 65535);
- } else if (address != "") {
- ServerListSpec server;
- server["name"] = menudata.servername;
- server["address"] = menudata.address;
- server["port"] = menudata.port;
- server["description"] = menudata.serverdescription;
- ServerList::insert(server);
+ } else {
+ g_settings->set("name", playername);
+ if (address != "") {
+ ServerListSpec server;
+ server["name"] = menudata.servername;
+ server["address"] = menudata.address;
+ server["port"] = menudata.port;
+ server["description"] = menudata.serverdescription;
+ ServerList::insert(server);
+ }
}
infostream << "Selected world: " << worldspec.name