]> git.xonotic.org Git - xonotic/netradiant.git/blobdiff - tools/quake3/q3map2/path_init.c
Merge branch 'nomagicpath' into 'master'
[xonotic/netradiant.git] / tools / quake3 / q3map2 / path_init.c
index ef346f70bd596f88011b612c8a8e347dc943a3f2..80cdbcae5d4e1fb50d571b72532c6c4919000df7 100644 (file)
@@ -409,6 +409,7 @@ void InitPaths( int *argc, char **argv ){
 
        int noBasePath = 0;
        int noHomePath = 0;
+       int noMagicPath = 0;
 
        /* note it */
        Sys_FPrintf( SYS_VRB, "--- InitPaths ---\n" );
@@ -459,9 +460,17 @@ void InitPaths( int *argc, char **argv ){
                /* -fs_nobasepath */
                else if ( strcmp( argv[ i ], "-fs_nobasepath" ) == 0 ) {
                        noBasePath = 1;
+                       // we don't want any basepath, neither guessed ones
+                       noMagicPath = 1;
                        argv[ i ] = NULL;
                }               
 
+               /* -fs_nomagicpath */
+               else if ( strcmp( argv[ i ], "-fs_nomagicpath") == 0) {
+                       noMagicPath = 1;
+                       argv[ i ] = NULL;
+               }
+
                /* -fs_basepath */
                else if ( strcmp( argv[ i ], "-fs_basepath" ) == 0 ) {
                        if ( ++i >= *argc ) {
@@ -528,7 +537,6 @@ void InitPaths( int *argc, char **argv ){
                        AddPakPath( argv[ i ] );
                        argv[ i ] = NULL;
                }
-
        }
 
        /* remove processed arguments */
@@ -545,8 +553,8 @@ void InitPaths( int *argc, char **argv ){
        /* add standard game path */
        AddGamePath( game->gamePath );
 
-       /* if there is no base path set, figure it out */
-       if ( numBasePaths == 0 && noBasePath == 0 ) {
+       /* if there is no base path set, figure it out unless fs_nomagicpath is set */
+       if ( numBasePaths == 0 && noBasePath == 0 && noMagicPath == 0 ) {
                /* this is another crappy replacement for SetQdirFromPath() */
                len2 = strlen( game->magic );
                for ( i = 0; i < *argc && numBasePaths == 0; i++ )