--world implies local game
authorPerttu Ahola <celeron55@gmail.com>
Sun, 11 Mar 2012 14:11:07 +0000 (16:11 +0200)
committerPerttu Ahola <celeron55@gmail.com>
Sun, 11 Mar 2012 14:11:07 +0000 (16:11 +0200)
src/main.cpp

index b85dee77ce4cea594d730ab4ec87d9bdc67abbdb..73469471da4e8cc48b0d10c85bf91b0958002eb1 100644 (file)
@@ -777,7 +777,7 @@ int main(int argc, char *argv[])
        allowed_options.insert("map-dir", ValueSpec(VALUETYPE_STRING,
                        "Same as --world (deprecated)"));
        allowed_options.insert("world", ValueSpec(VALUETYPE_STRING,
-                       "Set world path"));
+                       "Set world path (implies local game)"));
        allowed_options.insert("verbose", ValueSpec(VALUETYPE_FLAG,
                        "Print more information to console"));
        allowed_options.insert("logfile", ValueSpec(VALUETYPE_STRING,
@@ -1059,6 +1059,8 @@ int main(int argc, char *argv[])
        std::string address = g_settings->get("address");
        if(cmd_args.exists("address"))
                address = cmd_args.get("address");
+       else if(cmd_args.exists("world"))
+               address = "";
        
        std::string playername = g_settings->get("name");
        if(cmd_args.exists("name"))