add an option -fs_homebase to override homebase path in the game pack (for use by gamepacks so they need no specific q3map2 change to use the right home dir)

git-svn-id: svn://svn.icculus.org/netradiant/trunk@221 61c419a2-8eb2-4b30-bcec-8cead039b335
This commit is contained in:
divverent 2009-03-16 12:26:23 +00:00
parent 4e4bbb9546
commit 3f92bea422

View File

@ -49,7 +49,7 @@ int numBasePaths;
char *basePaths[ MAX_BASE_PATHS ];
int numGamePaths;
char *gamePaths[ MAX_GAME_PATHS ];
char *homeBasePath = NULL;
/*
@ -378,6 +378,16 @@ void InitPaths( int *argc, char **argv )
AddGamePath( argv[ i ] );
argv[ i ] = NULL;
}
/* -fs_nohomebase */
else if( strcmp( argv[ i ], "-fs_homebase" ) == 0 )
{
if( ++i >= *argc )
Error( "Out of arguments: No path specified after %s.", argv[ i - 1 ] );
argv[ i - 1 ] = NULL;
homeBasePath = argv[i];
argv[ i ] = NULL;
}
}
/* remove processed arguments */
@ -433,6 +443,9 @@ void InitPaths( int *argc, char **argv )
}
/* this only affects unix */
if(homeBasePath)
AddHomeBasePath( homeBasePath );
else
AddHomeBasePath( game->homeBasePath );
/* initialize vfs paths */