aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCraig Robbins <kde.psych@gmail.com>2014-11-28 22:29:34 +1000
committerCraig Robbins <kde.psych@gmail.com>2014-11-28 22:48:46 +1000
commitedb125837cec7e817e9bff1f43eeee374590c60c (patch)
treeb6d9b17feaf6a160545affcd483e748fee7a99a3 /src
parent6a43b3af09944f1d218b20be034ccb9e6ea073ff (diff)
downloadminetest-edb125837cec7e817e9bff1f43eeee374590c60c.tar.gz
minetest-edb125837cec7e817e9bff1f43eeee374590c60c.tar.bz2
minetest-edb125837cec7e817e9bff1f43eeee374590c60c.zip
Fix regression with command line --go option
Diffstat (limited to 'src')
-rw-r--r--src/main.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 23ce01073..2ebdeda20 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1818,8 +1818,17 @@ bool ClientLauncher::run(GameParams &game_params, const Settings &cmd_args)
void ClientLauncher::init_args(GameParams &game_params, const Settings &cmd_args)
{
+
+ skip_main_menu = cmd_args.getFlag("go");
+
+ // FIXME: This is confusing (but correct)
+
+ /* If world_path is set then override it unless skipping the main menu using
+ * the --go command line param. Else, give preference to the address
+ * supplied on the command line
+ */
address = g_settings->get("address");
- if (game_params.world_path != "")
+ if (game_params.world_path != "" && !skip_main_menu)
address = "";
else if (cmd_args.exists("address"))
address = cmd_args.get("address");
@@ -1828,8 +1837,6 @@ void ClientLauncher::init_args(GameParams &game_params, const Settings &cmd_args
if (cmd_args.exists("name"))
playername = cmd_args.get("name");
- skip_main_menu = cmd_args.getFlag("go");
-
list_video_modes = cmd_args.getFlag("videomodes");
use_freetype = g_settings->getBool("freetype");