]> git.xonotic.org Git - xonotic/netradiant.git/blobdiff - tools/quake3/q3map2/path_init.c
support passing the home path to q3map2 as -fs_home (home dir only, ends with /....
[xonotic/netradiant.git] / tools / quake3 / q3map2 / path_init.c
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 */