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-Tag: 0.4.dev-20120318~38 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=2e61008fd99849a9587f2e7f7f0a2b94fb169391;p=oweals%2Fminetest.git Use default_game when making a new world using --world without --gameid --- diff --git a/src/main.cpp b/src/main.cpp index 01c9b2c5c..5e46018c3 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)