From: Perttu Ahola Date: Sun, 11 Mar 2012 19:24:29 +0000 (+0200) Subject: Use default_game when making a new world using --world without --gameid X-Git-Url: http://81.2.79.47:8989/gitweb/?a=commitdiff_plain;h=2e61008fd99849a9587f2e7f7f0a2b94fb169391;p=zefram%2Fminetest%2Fminetest_engine.git Use default_game when making a new world using --world without --gameid --- diff --git a/src/main.cpp b/src/main.cpp index 01c9b2c5..5e46018c 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1279,7 +1279,9 @@ int main(int argc, char *argv[]) menudata.selected_world = -1; // If a world was commanded, append and select it if(commanded_world != ""){ - std::string gameid = getWorldGameId(commanded_world); + std::string gameid = getWorldGameId(commanded_world, true); + if(gameid == "") + gameid = g_settings->get("default_game"); WorldSpec spec(commanded_world, "[commanded world]", gameid); worldspecs.push_back(spec); menudata.worlds.push_back(narrow_to_wide(spec.name)