mirror of
https://git.code.sf.net/p/quake/nuq
synced 2025-01-18 23:42:02 +00:00
nuq.conf is now read and +set foo on the command line is supported
This commit is contained in:
parent
1ddf60ea24
commit
85dc32f2b6
2 changed files with 33 additions and 7 deletions
|
@ -131,6 +131,12 @@ void Cmd_Print (char *text);
|
|||
// used by command functions to send output to either the graphics console or
|
||||
// passed as a print message to the client
|
||||
|
||||
void Cmd_StuffCmds_f (void);
|
||||
|
||||
void Cbuf_Execute_Sets (void);
|
||||
void Cmd_Exec_File (char *path);
|
||||
|
||||
|
||||
#define MAX_COM_TOKEN 1024
|
||||
extern char com_token[MAX_COM_TOKEN];
|
||||
char *COM_Parse (char *data);
|
||||
|
|
|
@ -84,6 +84,8 @@ jmp_buf host_abortserver;
|
|||
byte *host_basepal;
|
||||
byte *host_colormap;
|
||||
|
||||
cvar_t *fs_globalcfg;
|
||||
|
||||
cvar_t *host_framerate;
|
||||
cvar_t *host_speeds;
|
||||
|
||||
|
@ -97,11 +99,7 @@ cvar_t *teamplay;
|
|||
cvar_t *samelevel;
|
||||
cvar_t *noexit;
|
||||
|
||||
#ifdef QUAKE2
|
||||
cvar_t *developer;
|
||||
#else
|
||||
cvar_t *developer;
|
||||
#endif
|
||||
|
||||
cvar_t *skill;
|
||||
cvar_t *deathmatch;
|
||||
|
@ -882,16 +880,38 @@ void Host_Init (quakeparms_t *parms)
|
|||
com_argv = parms->argv;
|
||||
|
||||
Memory_Init (parms->membase, parms->memsize);
|
||||
Cvar_Init ();
|
||||
CL_InitCvars ();
|
||||
|
||||
Cbuf_Init ();
|
||||
Cmd_Init ();
|
||||
Cvar_Init ();
|
||||
|
||||
CL_InitCvars ();
|
||||
// execute +set as early as possible
|
||||
Cmd_StuffCmds_f ();
|
||||
Cbuf_Execute_Sets ();
|
||||
|
||||
// execute the global configuration file if it exists
|
||||
// would have been nice if Cmd_Exec_f could have been used, but it
|
||||
// only reads from within the quake file system, and changing that is
|
||||
// probably Not A Good Thing (tm).
|
||||
fs_globalcfg = Cvar_Get("fs_globalcfg", FS_GLOBALCFG,
|
||||
CVAR_ROM, "global configuration file");
|
||||
Cmd_Exec_File (fs_globalcfg->string);
|
||||
Cbuf_Execute_Sets ();
|
||||
|
||||
Cmd_StuffCmds_f ();
|
||||
Cbuf_Execute_Sets ();
|
||||
|
||||
V_Init ();
|
||||
SCR_InitCvars ();
|
||||
VID_InitCvars ();
|
||||
COM_Init ();
|
||||
|
||||
V_Init ();
|
||||
// reparse the command line for + commands other than set
|
||||
// (sets still done, but it doesn't matter)
|
||||
Cmd_StuffCmds_f ();
|
||||
Cbuf_Execute ();
|
||||
|
||||
Chase_Init ();
|
||||
Host_InitVCR (parms);
|
||||
Host_InitLocal ();
|
||||
|
|
Loading…
Reference in a new issue