Skip to content

Commit

Permalink
Fix regression with command line --go option
Browse files Browse the repository at this point in the history
  • Loading branch information
Zeno- committed Nov 28, 2014
1 parent 6a43b3a commit edb1258
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/main.cpp
Expand Up @@ -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");
Expand All @@ -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");
Expand Down

0 comments on commit edb1258

Please sign in to comment.