mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-23 04:42:32 +00:00
fix the non-parsing of quakeforge.conf
This commit is contained in:
parent
ad6e025a91
commit
0bb6769204
5 changed files with 12 additions and 12 deletions
|
@ -61,7 +61,7 @@ void Cmd_Command (struct cbuf_args_s *args);
|
||||||
int Cmd_ExecuteString (const char *text, cmd_source_t src);
|
int Cmd_ExecuteString (const char *text, cmd_source_t src);
|
||||||
struct cbuf_s;
|
struct cbuf_s;
|
||||||
void Cmd_StuffCmds (struct cbuf_s *cbuf);
|
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_Return (const char *value);
|
||||||
void Cmd_Error (const char *message);
|
void Cmd_Error (const char *message);
|
||||||
|
|
||||||
|
|
|
@ -601,7 +601,7 @@ Cmd_ExecuteString (const char *text, cmd_source_t src)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Cmd_Exec_File (const char *path)
|
Cmd_Exec_File (cbuf_t *cbuf, const char *path)
|
||||||
{
|
{
|
||||||
char *f;
|
char *f;
|
||||||
int len;
|
int len;
|
||||||
|
@ -617,7 +617,7 @@ Cmd_Exec_File (const char *path)
|
||||||
Qread (file, f, len);
|
Qread (file, f, len);
|
||||||
Qclose (file);
|
Qclose (file);
|
||||||
// Always insert into console
|
// Always insert into console
|
||||||
Cbuf_InsertText (cmd_cbuf, f);
|
Cbuf_InsertText (cbuf, f);
|
||||||
free (f);
|
free (f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -867,7 +867,7 @@ Host_Init (void)
|
||||||
// probably Not A Good Thing (tm).
|
// probably Not A Good Thing (tm).
|
||||||
fs_globalcfg = Cvar_Get ("fs_globalcfg", FS_GLOBALCFG,
|
fs_globalcfg = Cvar_Get ("fs_globalcfg", FS_GLOBALCFG,
|
||||||
CVAR_ROM, NULL, "global configuration file");
|
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);
|
Cbuf_Execute_Sets (host_cbuf);
|
||||||
|
|
||||||
// execute +set again to override the config file
|
// 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,
|
fs_usercfg = Cvar_Get ("fs_usercfg", FS_USERCFG, CVAR_ROM, NULL,
|
||||||
"user configuration file");
|
"user configuration file");
|
||||||
Cmd_Exec_File (fs_usercfg->string);
|
Cmd_Exec_File (host_cbuf, fs_usercfg->string);
|
||||||
Cbuf_Execute_Sets (host_cbuf);
|
Cbuf_Execute_Sets (host_cbuf);
|
||||||
|
|
||||||
// execute +set again to override the config file
|
// execute +set again to override the config file
|
||||||
|
@ -966,7 +966,7 @@ Host_Init (void)
|
||||||
|
|
||||||
if (!isDedicated && cl_quakerc->int_val)
|
if (!isDedicated && cl_quakerc->int_val)
|
||||||
Cbuf_InsertText (host_cbuf, "exec quake.rc\n");
|
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
|
// reparse the command line for + commands other than set
|
||||||
// (sets still done, but it doesn't matter)
|
// (sets still done, but it doesn't matter)
|
||||||
if (isDedicated || (cl_quakerc->int_val && check_quakerc ()))
|
if (isDedicated || (cl_quakerc->int_val && check_quakerc ()))
|
||||||
|
|
|
@ -1681,7 +1681,7 @@ Host_Init (void)
|
||||||
// probably Not A Good Thing (tm).
|
// probably Not A Good Thing (tm).
|
||||||
fs_globalcfg = Cvar_Get ("fs_globalcfg", FS_GLOBALCFG, CVAR_ROM, NULL,
|
fs_globalcfg = Cvar_Get ("fs_globalcfg", FS_GLOBALCFG, CVAR_ROM, NULL,
|
||||||
"global configuration file");
|
"global configuration file");
|
||||||
Cmd_Exec_File (fs_globalcfg->string);
|
Cmd_Exec_File (cl_cbuf, fs_globalcfg->string);
|
||||||
Cbuf_Execute_Sets (cl_cbuf);
|
Cbuf_Execute_Sets (cl_cbuf);
|
||||||
|
|
||||||
// execute +set again to override the config file
|
// 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,
|
fs_usercfg = Cvar_Get ("fs_usercfg", FS_USERCFG, CVAR_ROM, NULL,
|
||||||
"user configuration file");
|
"user configuration file");
|
||||||
Cmd_Exec_File (fs_usercfg->string);
|
Cmd_Exec_File (cl_cbuf, fs_usercfg->string);
|
||||||
Cbuf_Execute_Sets (cl_cbuf);
|
Cbuf_Execute_Sets (cl_cbuf);
|
||||||
|
|
||||||
// execute +set again to override the config file
|
// execute +set again to override the config file
|
||||||
|
@ -1791,7 +1791,7 @@ Host_Init (void)
|
||||||
|
|
||||||
if (cl_quakerc->int_val)
|
if (cl_quakerc->int_val)
|
||||||
Cbuf_InsertText (cl_cbuf, "exec quake.rc\n");
|
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.
|
// Reparse the command line for + commands.
|
||||||
// (Note, no non-base commands exist yet)
|
// (Note, no non-base commands exist yet)
|
||||||
if (!cl_quakerc->int_val || check_quakerc ())
|
if (!cl_quakerc->int_val || check_quakerc ())
|
||||||
|
|
|
@ -2429,7 +2429,7 @@ SV_Init (void)
|
||||||
// probably Not A Good Thing (tm).
|
// probably Not A Good Thing (tm).
|
||||||
fs_globalcfg = Cvar_Get ("fs_globalcfg", FS_GLOBALCFG,
|
fs_globalcfg = Cvar_Get ("fs_globalcfg", FS_GLOBALCFG,
|
||||||
CVAR_ROM, 0, "global configuration file");
|
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);
|
Cbuf_Execute_Sets (sv_cbuf);
|
||||||
|
|
||||||
// execute +set again to override the config file
|
// execute +set again to override the config file
|
||||||
|
@ -2438,7 +2438,7 @@ SV_Init (void)
|
||||||
|
|
||||||
fs_usercfg = Cvar_Get ("fs_usercfg", FS_USERCFG,
|
fs_usercfg = Cvar_Get ("fs_usercfg", FS_USERCFG,
|
||||||
CVAR_ROM, 0, "user configuration file");
|
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);
|
Cbuf_Execute_Sets (sv_cbuf);
|
||||||
|
|
||||||
// execute +set again to override the config file
|
// execute +set again to override the config file
|
||||||
|
@ -2507,7 +2507,7 @@ SV_Init (void)
|
||||||
SV_Printf ("<==> %s initialized <==>\n", PROGRAM);
|
SV_Printf ("<==> %s initialized <==>\n", PROGRAM);
|
||||||
|
|
||||||
// process command line arguments
|
// process command line arguments
|
||||||
Cmd_Exec_File (fs_usercfg->string);
|
Cmd_Exec_File (sv_cbuf, fs_usercfg->string);
|
||||||
Cmd_StuffCmds (sv_cbuf);
|
Cmd_StuffCmds (sv_cbuf);
|
||||||
Cbuf_Execute (sv_cbuf);
|
Cbuf_Execute (sv_cbuf);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue