Skip to content

Commit

Permalink
Fix a small regression caused by e2ad76f.
Browse files Browse the repository at this point in the history
  • Loading branch information
red-001 authored and sfan5 committed Feb 16, 2017
1 parent a5e4273 commit 2dcbc01
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions src/client/clientlauncher.cpp
Expand Up @@ -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;
Expand All @@ -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
Expand Down

0 comments on commit 2dcbc01

Please sign in to comment.