mirror of
https://git.code.sf.net/p/quake/newtree
synced 2025-06-01 17:42:30 +00:00
port over nuq's modified filesystem init code. no longer creates dirs when
fs_userpath is ".".
This commit is contained in:
parent
e9276ec91f
commit
4962c3bf0b
1 changed files with 22 additions and 7 deletions
|
@ -40,6 +40,7 @@
|
||||||
#include "qendian.h"
|
#include "qendian.h"
|
||||||
#include "info.h"
|
#include "info.h"
|
||||||
#include "server.h"
|
#include "server.h"
|
||||||
|
#include "qargs.h"
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
@ -998,12 +999,26 @@ void COM_Gamedir_f (void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
COM_CreateGameDirectory
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
COM_CreateGameDirectory (char *gamename)
|
||||||
|
{
|
||||||
|
if (strcmp (fs_userpath->string, FS_USERPATH))
|
||||||
|
COM_CreatePath (va("%s/%s/dummy", fs_userpath->string,
|
||||||
|
gamename));
|
||||||
|
COM_AddGameDirectory (gamename);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
COM_InitFilesystem
|
COM_InitFilesystem
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
COM_InitFilesystem ( void )
|
COM_InitFilesystem ( void )
|
||||||
{
|
{
|
||||||
|
int i;
|
||||||
|
|
||||||
fs_sharepath = Cvar_Get ("fs_sharepath", FS_SHAREPATH, CVAR_ROM,
|
fs_sharepath = Cvar_Get ("fs_sharepath", FS_SHAREPATH, CVAR_ROM,
|
||||||
"location of shared (read only) game directories");
|
"location of shared (read only) game directories");
|
||||||
fs_userpath = Cvar_Get ("fs_userpath", FS_USERPATH, CVAR_ROM,
|
fs_userpath = Cvar_Get ("fs_userpath", FS_USERPATH, CVAR_ROM,
|
||||||
|
@ -1015,15 +1030,15 @@ COM_InitFilesystem ( void )
|
||||||
/*
|
/*
|
||||||
start up with basegame->string by default
|
start up with basegame->string by default
|
||||||
*/
|
*/
|
||||||
COM_CreatePath (va("%s/%s/dummy", fs_userpath->string,
|
COM_CreateGameDirectory (fs_basegame->string);
|
||||||
fs_basegame->string));
|
|
||||||
COM_AddGameDirectory(fs_basegame->string);
|
|
||||||
|
|
||||||
// If we're dealing with id1, use qw too
|
// If we're dealing with id1, use qw too
|
||||||
if (stricmp (fs_basegame->string, "id1") == 0)
|
if (stricmp (fs_basegame->string, "id1") == 0) {
|
||||||
{
|
COM_CreateGameDirectory ("qw");
|
||||||
COM_CreatePath (va("%s/qw/dummy", fs_userpath->string));
|
}
|
||||||
COM_AddGameDirectory ("qw");
|
|
||||||
|
if ((i = COM_CheckParm ("-game")) && i < com_argc - 1) {
|
||||||
|
COM_CreateGameDirectory(com_argv[i+1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
// any set gamedirs will be freed up to here
|
// any set gamedirs will be freed up to here
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue