]> de.git.xonotic.org Git - xonotic/netradiant.git/commitdiff
support passing the home path to q3map2 as -fs_home (home dir only, ends with /....
authorRudolf Polzer <divVerent@xonotic.org>
Sun, 1 May 2011 16:49:33 +0000 (18:49 +0200)
committerRudolf Polzer <divVerent@xonotic.org>
Sun, 1 May 2011 16:49:33 +0000 (18:49 +0200)
radiant/map.cpp
radiant/qe3.cpp
tools/quake3/q3map2/path_init.c

index 572459907e56867d1e820a877da5c78dc226f7eb..ec412965883f92352d5465d50c8b9fe61ea3133d 100644 (file)
@@ -1690,6 +1690,8 @@ tryDecompile:
     output.push_string((type && *type) ? type : "quake3");
     output.push_string(" -fs_basepath \"");
     output.push_string(EnginePath_get());
+    output.push_string(" -fs_homepath \"");
+    output.push_string(g_qeglobals.m_userEnginePath.c_str());
     output.push_string("\" -fs_game ");
     output.push_string(gamename_get());
     output.push_string(" -convert -format ");
index 1b3d060eddf7450334606c01f9312e9b6433d750..19d1d37c0df4dd1ae45c5f36637faa4d983578eb 100644 (file)
@@ -171,6 +171,7 @@ void bsp_init()
   build_set_variable("RadiantPath", AppPath_get());
   build_set_variable("ExecutableType", RADIANT_EXECUTABLE);
   build_set_variable("EnginePath", EnginePath_get());
+  build_set_variable("UserEnginePath", g_qeglobals.m_userEnginePath.c_str());
   build_set_variable("MonitorAddress", (g_WatchBSP_Enabled) ? "127.0.0.1:39000" : "");
   build_set_variable("GameName", gamename_get());
 
index 40afaf8d2d25c1f47658cf09079d9b4ba34b3af6..e3250aeea19d03f4c15000b3082e144b9823a56e 100644 (file)
@@ -450,10 +450,6 @@ void InitPaths( int *argc, char **argv )
                                Error( "Out of arguments: No path specified after %s.", argv[ i - 1 ] );
                        argv[ i - 1 ] = NULL;
                        homePath = argv[i];
-                       /* do we want to do this:
-                       if(!homeBasePath)
-                               homeBasePath = "."; // if only -fs_home is set, this shall be the FULL path!
-                       */
                        argv[ i ] = NULL;
                }
                
@@ -466,6 +462,17 @@ void InitPaths( int *argc, char **argv )
                        homeBasePath = argv[i];
                        argv[ i ] = NULL;
                }
+
+               /* -fs_homepath - sets both of them */
+               else if( strcmp( argv[ i ], "-fs_homepath" ) == 0 )
+               {
+                       if( ++i >= *argc )
+                               Error( "Out of arguments: No path specified after %s.", argv[ i - 1 ] );
+                       argv[ i - 1 ] = NULL;
+                       homePath = argv[i];
+                       homeBasePath = ".";
+                       argv[ i ] = NULL;
+               }
        }
        
        /* remove processed arguments */