Add a cl_quakerc cvar, for disabling the execution of the default

config.
This commit is contained in:
Adam Olsen 2001-09-06 23:58:28 +00:00
parent d7675ada7a
commit 22075ac46f
2 changed files with 14 additions and 6 deletions

View file

@ -98,6 +98,8 @@ cvar_t *host_speeds;
cvar_t *sys_ticrate;
cvar_t *serverprofile;
cvar_t *cl_quakerc;
cvar_t *fraglimit;
cvar_t *timelimit;
cvar_t *teamplay;
@ -238,6 +240,9 @@ Host_InitLocal (void)
sys_ticrate = Cvar_Get ("sys_ticrate", "0.05", CVAR_NONE, NULL, "None");
serverprofile = Cvar_Get ("serverprofile", "0", CVAR_NONE, NULL, "None");
cl_quakerc = Cvar_Get ("cl_quakerc", "1", CVAR_NONE, NULL,
"exec quake.rc on startup");
fraglimit = Cvar_Get ("fraglimit", "0", CVAR_SERVERINFO, Cvar_Info,
"None");
timelimit = Cvar_Get ("timelimit", "0", CVAR_SERVERINFO, Cvar_Info,
@ -980,13 +985,13 @@ Host_Init (quakeparms_t *parms)
}
CL_SetState (ca_disconnected);
Cbuf_InsertText ("exec quake.rc\n");
if (cl_quakerc->int_val)
Cbuf_InsertText ("exec quake.rc\n");
Cmd_Exec_File (fs_usercfg->string);
// reparse the command line for + commands other than set
// (sets still done, but it doesn't matter)
if (check_quakerc ()) {
if (cl_quakerc->int_val && check_quakerc ())
Cmd_StuffCmds_f ();
}
Hunk_AllocName (0, "-HOST_HUNKLEVEL-");
host_hunklevel = Hunk_LowMark ();

View file

@ -127,6 +127,7 @@ cvar_t *cl_timeout;
cvar_t *cl_shownet;
cvar_t *cl_autoexec;
cvar_t *cl_quakerc;
cvar_t *cl_sbar;
cvar_t *cl_sbar_separator;
cvar_t *cl_hudswap;
@ -1182,6 +1183,8 @@ CL_Init_Cvars (void)
"enables packets from the likes of gamespy");
cl_autoexec = Cvar_Get ("cl_autoexec", "0", CVAR_ROM, NULL,
"exec autoexec.cfg on gamedir change");
cl_quakerc = Cvar_Get ("cl_quakerc", "1", CVAR_NONE, NULL,
"exec quake.rc on startup");
cl_cshift_bonus = Cvar_Get ("cl_cshift_bonus", "1", CVAR_ARCHIVE, NULL,
"Show bonus flash on item pickup");
cl_cshift_contents = Cvar_Get ("cl_cshift_content", "1", CVAR_ARCHIVE,
@ -1666,13 +1669,13 @@ Host_Init (void)
IN_Init ();
#endif
Cbuf_InsertText ("exec quake.rc\n");
if (cl_quakerc->int_val)
Cbuf_InsertText ("exec quake.rc\n");
Cmd_Exec_File (fs_usercfg->string);
// Reparse the command line for + commands.
// (Note, no non-base commands exist yet)
if (check_quakerc ()) {
if (cl_quakerc->int_val && check_quakerc ())
Cmd_StuffCmds_f ();
}
Cbuf_AddText ("echo Type connect <internet address> or use a server "
"browser to connect to a game.\n");