From e9766bdd4a8b42e98932d5a07255d9ea2f70acae Mon Sep 17 00:00:00 2001 From: Joseph Carter Date: Sat, 20 May 2000 01:59:54 +0000 Subject: [PATCH] fs_gamebase cvar added, defaults to base or id1, depending on newstyle's setting. It's a CVAR_ROM, so the only place you can change it is from the cmdline or global config file. --- common/host.c | 4 ++++ common/quakefs.c | 10 +++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/common/host.c b/common/host.c index 0dc4e0f..050b2a8 100644 --- a/common/host.c +++ b/common/host.c @@ -526,6 +526,8 @@ Host_InitDisplay () } extern cvar_t *fs_basepath; +extern cvar_t *fs_sharepath; +extern cvar_t *fs_basegame; /* Host_Init @@ -583,6 +585,8 @@ Host_Init (quakeparms_t *parms) "the location of your game directories"); fs_sharepath = Cvar_Get ("fs_sharepath", fs_sharepath->string, CVAR_ROM, "read-only game directories"); + fs_basegame = Cvar_Get ("fs_basegame", fs_basegame->string, + CVAR_ROM, "the default gamedir"); V_Init (); Chase_Init (); diff --git a/common/quakefs.c b/common/quakefs.c index da660d2..e6ae4ae 100644 --- a/common/quakefs.c +++ b/common/quakefs.c @@ -88,6 +88,7 @@ char gamedirfile[MAX_OSPATH]; cvar_t *fs_basepath; cvar_t *fs_sharepath; +cvar_t *fs_basegame; #ifdef GENERATIONS #include @@ -929,7 +930,7 @@ COM_Gamedir (char *dir) // Cache_Flush (); - if (strcmp (dir, GAMENAME) == 0) + if (strcmp (dir, fs_basegame->string) == 0) return; #ifdef QUAKEWORLD if (strcmp (dir, "qw") == 0) @@ -992,12 +993,15 @@ COM_InitFilesystem ( void ) "the location of your game directories"); fs_sharepath = Cvar_Get ("fs_sharepath", fs_basepath->string, CVAR_NONE, "read-only game directories"); + fs_basegame = Cvar_Get ("fs_basegame", GAMENAME, + CVAR_NONE, "the default gamedir"); + Cmd_AddCommand ("gamedir", COM_Gamedir_f); /* - start up with GAMENAME by default + start up with fs_basegame by default */ - COM_AddGameDirectory (GAMENAME); + COM_AddGameDirectory (fs_basegame->string); if (hipnotic) COM_AddGameDirectory ("hipnotic"); if (rogue)