mirror of
https://git.code.sf.net/p/quake/nuq
synced 2025-02-14 16:10:50 +00:00
add -game foo handling
This commit is contained in:
parent
e0679ee1bf
commit
dd3b346d4f
1 changed files with 7 additions and 1 deletions
|
@ -67,6 +67,7 @@
|
||||||
#include "info.h"
|
#include "info.h"
|
||||||
#include "server.h"
|
#include "server.h"
|
||||||
#include "va.h"
|
#include "va.h"
|
||||||
|
#include "qargs.h"
|
||||||
|
|
||||||
extern qboolean is_server;
|
extern qboolean is_server;
|
||||||
qboolean standard_quake = true, abyss, rogue, hipnotic;
|
qboolean standard_quake = true, abyss, rogue, hipnotic;
|
||||||
|
@ -686,7 +687,7 @@ COM_LoadGameDirectory(char *dir)
|
||||||
for (i = count; i < bufsize; i++) {
|
for (i = count; i < bufsize; i++) {
|
||||||
pakfiles[i] = NULL;
|
pakfiles[i] = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
dir_ptr = opendir(dir);
|
dir_ptr = opendir(dir);
|
||||||
if (!dir_ptr)
|
if (!dir_ptr)
|
||||||
return;
|
return;
|
||||||
|
@ -898,6 +899,8 @@ COM_CreateGameDirectory (char *gamename)
|
||||||
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,
|
||||||
|
@ -910,6 +913,9 @@ COM_InitFilesystem ( void )
|
||||||
start up with basegame->string by default
|
start up with basegame->string by default
|
||||||
*/
|
*/
|
||||||
COM_CreateGameDirectory(fs_basegame->string);
|
COM_CreateGameDirectory(fs_basegame->string);
|
||||||
|
if ((i = COM_CheckParm ("-game")) && i < com_argc-1) {
|
||||||
|
COM_CreateGameDirectory(com_argv[i+1]);
|
||||||
|
}
|
||||||
if (hipnotic) {
|
if (hipnotic) {
|
||||||
COM_CreateGameDirectory("hipnotic");
|
COM_CreateGameDirectory("hipnotic");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue