Use default_game when making a new world using --world without --gameid
authorPerttu Ahola <celeron55@gmail.com>
Sun, 11 Mar 2012 19:24:29 +0000 (21:24 +0200)
committerPerttu Ahola <celeron55@gmail.com>
Sun, 11 Mar 2012 19:24:29 +0000 (21:24 +0200)
src/main.cpp

index 01c9b2c5c287200b5b46008b0da01af70901a1c1..5e46018c3793e936317ad20b9c731de6ee34fb74 100644 (file)
@@ -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)