]> git.xonotic.org Git - xonotic/netradiant.git/blobdiff - radiant/environment.cpp
Merge commit 'ca4a8002f895c3474b3a5087ff027c31dadc712f' into master-merge
[xonotic/netradiant.git] / radiant / environment.cpp
index f2315b85a743960d7acb2c5354c982f97916f5ff..e9cf2dc513e6f40f5cb986055fea64049435ab7b 100644 (file)
@@ -110,7 +110,8 @@ bool gamedetect_check_game( char const *gamefile, const char *checkfile1, const
 void gamedetect(){
        // if we're inside a Nexuiz install
        // default to nexuiz.game (unless the user used an option to inhibit this)
-       bool nogamedetect = false;
+       //bool nogamedetect = false;
+       bool nogamedetect = true;
        int i;
        for ( i = 1; i < g_argc - 1; ++i )
        {
@@ -342,6 +343,18 @@ void environment_init( int argc, char const* argv[] ){
 
 #include <windows.h>
 
+char openCmdMap[260];
+
+void cmdMap(){
+       openCmdMap[0] = '\0';
+       for ( int i = 1; i < g_argc; ++i )
+       {
+               if ( !stricmp( g_argv[i] + strlen(g_argv[i]) - 4, ".map" ) ){
+                       strcpy( openCmdMap, g_argv[i] );
+               }
+       }
+}
+
 void environment_init( int argc, char const* argv[] ){
        args_init( argc, argv );
 
@@ -385,6 +398,7 @@ void environment_init( int argc, char const* argv[] ){
                home_path = home.c_str();
        }
        gamedetect();
+       cmdMap();
 }
 
 #else