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.
This commit is contained in:
Joseph Carter 2000-05-20 01:59:54 +00:00
parent 1f11e0573b
commit e9766bdd4a
2 changed files with 11 additions and 3 deletions

View file

@ -526,6 +526,8 @@ Host_InitDisplay ()
} }
extern cvar_t *fs_basepath; extern cvar_t *fs_basepath;
extern cvar_t *fs_sharepath;
extern cvar_t *fs_basegame;
/* /*
Host_Init Host_Init
@ -583,6 +585,8 @@ Host_Init (quakeparms_t *parms)
"the location of your game directories"); "the location of your game directories");
fs_sharepath = Cvar_Get ("fs_sharepath", fs_sharepath->string, fs_sharepath = Cvar_Get ("fs_sharepath", fs_sharepath->string,
CVAR_ROM, "read-only game directories"); CVAR_ROM, "read-only game directories");
fs_basegame = Cvar_Get ("fs_basegame", fs_basegame->string,
CVAR_ROM, "the default gamedir");
V_Init (); V_Init ();
Chase_Init (); Chase_Init ();

View file

@ -88,6 +88,7 @@ char gamedirfile[MAX_OSPATH];
cvar_t *fs_basepath; cvar_t *fs_basepath;
cvar_t *fs_sharepath; cvar_t *fs_sharepath;
cvar_t *fs_basegame;
#ifdef GENERATIONS #ifdef GENERATIONS
#include <unzip.h> #include <unzip.h>
@ -929,7 +930,7 @@ COM_Gamedir (char *dir)
// //
Cache_Flush (); Cache_Flush ();
if (strcmp (dir, GAMENAME) == 0) if (strcmp (dir, fs_basegame->string) == 0)
return; return;
#ifdef QUAKEWORLD #ifdef QUAKEWORLD
if (strcmp (dir, "qw") == 0) if (strcmp (dir, "qw") == 0)
@ -992,12 +993,15 @@ COM_InitFilesystem ( void )
"the location of your game directories"); "the location of your game directories");
fs_sharepath = Cvar_Get ("fs_sharepath", fs_basepath->string, fs_sharepath = Cvar_Get ("fs_sharepath", fs_basepath->string,
CVAR_NONE, "read-only game directories"); CVAR_NONE, "read-only game directories");
fs_basegame = Cvar_Get ("fs_basegame", GAMENAME,
CVAR_NONE, "the default gamedir");
Cmd_AddCommand ("gamedir", COM_Gamedir_f); 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) if (hipnotic)
COM_AddGameDirectory ("hipnotic"); COM_AddGameDirectory ("hipnotic");
if (rogue) if (rogue)