* -fs_basegame gamename: Overrides default game directory name (e.g. Q3A uses 'baseq3', OpenArena 'baseoa', so -game quake3 -fs_basegame baseoa for OA )

This commit is contained in:
Garux
2021-09-16 15:26:55 +03:00
parent 97ad9bf5c5
commit e22e6169c9
3 changed files with 16 additions and 3 deletions

View File

@@ -385,7 +385,8 @@ void HelpCommon()
{"-force", "Allow reading some broken/unsupported BSP files e.g. when decompiling, may also crash"},
{"-fs_basepath <path>", "Sets the given path as main directory of the game (can be used more than once to look in multiple paths)"},
{"-fs_forbiddenpath <pattern>", "Pattern to ignore directories, pk3, and pk3dir; example pak?.pk3 (can be used more than once to look for multiple patterns)"},
{"-fs_game <gamename>", "Sets a different game directory name (default for Q3A: baseq3, can be used more than once)"},
{"-fs_game <gamename>", "Sets extra game directory name to additionally load mod's resources from at higher priority (by default for Q3A 'baseq3' is loaded, -fs_game cpma will also load 'cpma'; can be used more than once)"},
{"-fs_basegame <gamename>", "Overrides default game directory name (e.g. Q3A uses 'baseq3', OpenArena 'baseoa', so -game quake3 -fs_basegame baseoa for OA )"},
{"-fs_home <dir>", "Specifies where the user home directory is on Linux"},
{"-fs_homebase <dir>", "Specifies game home directory relative to user home directory on Linux (default for Q3A: .q3a)"},
{"-fs_homepath <path>", "Sets the given path as the game home directory name (fs_home + fs_homebase)"},

View File

@@ -359,6 +359,7 @@ void AddPakPath( char *path ){
void InitPaths( int *argc, char **argv ){
int i, j, k;
char temp[ MAX_OS_PATH ];
const char *baseGame = nullptr;
/* note it */
@@ -425,6 +426,16 @@ void InitPaths( int *argc, char **argv ){
argv[ i ] = NULL;
}
/* -fs_basegame */
else if ( striEqual( argv[ i ], "-fs_basegame" ) ) {
if ( ++i >= *argc || !argv[ i ] ) {
Error( "Out of arguments: No path specified after %s.", argv[ i - 1 ] );
}
argv[ i - 1 ] = NULL;
baseGame = argv[ i ];
argv[ i ] = NULL;
}
/* -fs_home */
else if ( striEqual( argv[ i ], "-fs_home" ) ) {
if ( ++i >= *argc || !argv[ i ] ) {
@@ -481,7 +492,7 @@ void InitPaths( int *argc, char **argv ){
*argc = k;
/* add standard game path */
AddGamePath( g_game->gamePath );
AddGamePath( baseGame == nullptr? g_game->gamePath : baseGame );
/* if there is no base path set, figure it out */
if ( numBasePaths == 0 ) {