diff options
author | Perttu Ahola <celeron55@gmail.com> | 2012-03-11 21:24:29 +0200 |
---|---|---|
committer | Perttu Ahola <celeron55@gmail.com> | 2012-03-11 21:24:29 +0200 |
commit | 2e61008fd99849a9587f2e7f7f0a2b94fb169391 (patch) | |
tree | 30b98458cd5cfff8386dd99ac5d4768e3a491a5b /src | |
parent | eafde7186fe47c5ddd54812bc3414a7765eb1f9c (diff) | |
download | minetest-2e61008fd99849a9587f2e7f7f0a2b94fb169391.tar.gz minetest-2e61008fd99849a9587f2e7f7f0a2b94fb169391.tar.bz2 minetest-2e61008fd99849a9587f2e7f7f0a2b94fb169391.zip |
Use default_game when making a new world using --world without --gameid
Diffstat (limited to 'src')
-rw-r--r-- | src/main.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
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) |