redid the way -basedir works, implemented it in the filesystem init code, and it works now (the previous windoze support was broken because the basedir parm was not being used anyway)

This commit is contained in:
Forest Hale 2000-11-27 10:55:27 +00:00
parent d82b6a2e88
commit b2fa746f90
3 changed files with 10 additions and 12 deletions

View file

@ -495,11 +495,6 @@ int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLin
SetForegroundWindow (hwnd_dialog);
}
// LordHavoc: check for -basedir
t = COM_CheckParm ("-basedir");
if (t && (t + 1) < com_argc)
parms.basedir = com_argv[t];
// take the greater of all the available memory or half the total memory,
// but at least 8 Mb and no more than 16 Mb, unless they explicitly
// request otherwise

View file

@ -1065,9 +1065,17 @@ COM_Filesystem_Init ( void )
void
COM_Filesystem_Init_Cvars ( void )
{
fs_sharepath = Cvar_Get ("fs_sharepath", FS_SHAREPATH, CVAR_ROM,
int t;
char *s, *u;
// LordHavoc: check for -basedir
s = FS_SHAREPATH;
u = FS_USERPATH;
t = COM_CheckParm("-basedir");
if (t && (t + 1) < com_argc)
s = u = com_argv[t+1];
fs_sharepath = Cvar_Get ("fs_sharepath", s, CVAR_ROM,
"location of shared (read only) game directories");
fs_userpath = Cvar_Get ("fs_userpath", FS_USERPATH, CVAR_ROM,
fs_userpath = Cvar_Get ("fs_userpath", u, CVAR_ROM,
"location of your game directories");
fs_basegame = Cvar_Get ("fs_basegame", BASEGAME, CVAR_ROM,
"game to use by default");

View file

@ -225,11 +225,6 @@ int main (int argc, char **argv)
parms.basedir = ".";
// LordHavoc: check for -basedir
t = COM_CheckParm ("-basedir");
if (t && (t + 1) < com_argc)
parms.basedir = com_argv[t];
SV_Init (&parms);
if (COM_CheckParm ("-nopriority"))