mirror of
https://git.code.sf.net/p/quake/newtree
synced 2024-11-25 13:32:01 +00:00
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:
parent
d82b6a2e88
commit
b2fa746f90
3 changed files with 10 additions and 12 deletions
|
@ -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
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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"))
|
||||
|
|
Loading…
Reference in a new issue