fix the non-parsing of quakeforge.conf

This commit is contained in:
Bill Currie 2002-07-31 06:06:44 +00:00
parent ad6e025a91
commit 0bb6769204
5 changed files with 12 additions and 12 deletions

View file

@ -61,7 +61,7 @@ void Cmd_Command (struct cbuf_args_s *args);
int Cmd_ExecuteString (const char *text, cmd_source_t src);
struct cbuf_s;
void Cmd_StuffCmds (struct cbuf_s *cbuf);
void Cmd_Exec_File (const char *path);
void Cmd_Exec_File (struct cbuf_s *cbuf, const char *path);
void Cmd_Return (const char *value);
void Cmd_Error (const char *message);

View file

@ -601,7 +601,7 @@ Cmd_ExecuteString (const char *text, cmd_source_t src)
}
void
Cmd_Exec_File (const char *path)
Cmd_Exec_File (cbuf_t *cbuf, const char *path)
{
char *f;
int len;
@ -617,7 +617,7 @@ Cmd_Exec_File (const char *path)
Qread (file, f, len);
Qclose (file);
// Always insert into console
Cbuf_InsertText (cmd_cbuf, f);
Cbuf_InsertText (cbuf, f);
free (f);
}
}

View file

@ -867,7 +867,7 @@ Host_Init (void)
// probably Not A Good Thing (tm).
fs_globalcfg = Cvar_Get ("fs_globalcfg", FS_GLOBALCFG,
CVAR_ROM, NULL, "global configuration file");
Cmd_Exec_File (fs_globalcfg->string);
Cmd_Exec_File (host_cbuf, fs_globalcfg->string);
Cbuf_Execute_Sets (host_cbuf);
// execute +set again to override the config file
@ -876,7 +876,7 @@ Host_Init (void)
fs_usercfg = Cvar_Get ("fs_usercfg", FS_USERCFG, CVAR_ROM, NULL,
"user configuration file");
Cmd_Exec_File (fs_usercfg->string);
Cmd_Exec_File (host_cbuf, fs_usercfg->string);
Cbuf_Execute_Sets (host_cbuf);
// execute +set again to override the config file
@ -966,7 +966,7 @@ Host_Init (void)
if (!isDedicated && cl_quakerc->int_val)
Cbuf_InsertText (host_cbuf, "exec quake.rc\n");
Cmd_Exec_File (fs_usercfg->string);
Cmd_Exec_File (host_cbuf, fs_usercfg->string);
// reparse the command line for + commands other than set
// (sets still done, but it doesn't matter)
if (isDedicated || (cl_quakerc->int_val && check_quakerc ()))

View file

@ -1681,7 +1681,7 @@ Host_Init (void)
// probably Not A Good Thing (tm).
fs_globalcfg = Cvar_Get ("fs_globalcfg", FS_GLOBALCFG, CVAR_ROM, NULL,
"global configuration file");
Cmd_Exec_File (fs_globalcfg->string);
Cmd_Exec_File (cl_cbuf, fs_globalcfg->string);
Cbuf_Execute_Sets (cl_cbuf);
// execute +set again to override the config file
@ -1690,7 +1690,7 @@ Host_Init (void)
fs_usercfg = Cvar_Get ("fs_usercfg", FS_USERCFG, CVAR_ROM, NULL,
"user configuration file");
Cmd_Exec_File (fs_usercfg->string);
Cmd_Exec_File (cl_cbuf, fs_usercfg->string);
Cbuf_Execute_Sets (cl_cbuf);
// execute +set again to override the config file
@ -1791,7 +1791,7 @@ Host_Init (void)
if (cl_quakerc->int_val)
Cbuf_InsertText (cl_cbuf, "exec quake.rc\n");
Cmd_Exec_File (fs_usercfg->string);
Cmd_Exec_File (cl_cbuf, fs_usercfg->string);
// Reparse the command line for + commands.
// (Note, no non-base commands exist yet)
if (!cl_quakerc->int_val || check_quakerc ())

View file

@ -2429,7 +2429,7 @@ SV_Init (void)
// probably Not A Good Thing (tm).
fs_globalcfg = Cvar_Get ("fs_globalcfg", FS_GLOBALCFG,
CVAR_ROM, 0, "global configuration file");
Cmd_Exec_File (fs_globalcfg->string);
Cmd_Exec_File (sv_cbuf, fs_globalcfg->string);
Cbuf_Execute_Sets (sv_cbuf);
// execute +set again to override the config file
@ -2438,7 +2438,7 @@ SV_Init (void)
fs_usercfg = Cvar_Get ("fs_usercfg", FS_USERCFG,
CVAR_ROM, 0, "user configuration file");
Cmd_Exec_File (fs_usercfg->string);
Cmd_Exec_File (sv_cbuf, fs_usercfg->string);
Cbuf_Execute_Sets (sv_cbuf);
// execute +set again to override the config file
@ -2507,7 +2507,7 @@ SV_Init (void)
SV_Printf ("<==> %s initialized <==>\n", PROGRAM);
// process command line arguments
Cmd_Exec_File (fs_usercfg->string);
Cmd_Exec_File (sv_cbuf, fs_usercfg->string);
Cmd_StuffCmds (sv_cbuf);
Cbuf_Execute (sv_cbuf);