summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2012-03-13 01:45:38 +0200
committerPerttu Ahola <celeron55@gmail.com>2012-03-13 01:46:24 +0200
commit11b86f8d8a5ce8643b0d11390b5e51b4954105c8 (patch)
treef331832e63cd16cec21960a5ba5412d02ed7f202
parent71a3c2fcd13051dbaed45c69107a6e6b4a94cfe8 (diff)
downloadminetest-11b86f8d8a5ce8643b0d11390b5e51b4954105c8.tar.gz
minetest-11b86f8d8a5ce8643b0d11390b5e51b4954105c8.tar.bz2
minetest-11b86f8d8a5ce8643b0d11390b5e51b4954105c8.zip
Add [new] to world name when supplying a non-existent world on command line
-rw-r--r--src/main.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/main.cpp b/src/main.cpp
index e01e59a33..38a3b725b 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1308,10 +1308,12 @@ int main(int argc, char *argv[])
// If a world was commanded, append and select it
if(commanded_world != ""){
std::string gameid = getWorldGameId(commanded_world, true);
- if(gameid == "")
+ std::string name = "[--world parameter]";
+ if(gameid == ""){
gameid = g_settings->get("default_game");
- WorldSpec spec(commanded_world, "[--world parameter]",
- gameid);
+ name += " [new]";
+ }
+ WorldSpec spec(commanded_world, name, gameid);
worldspecs.push_back(spec);
menudata.selected_world = worldspecs.size()-1;
}