mirror of
https://git.code.sf.net/p/quake/quakeforge-old
synced 2024-11-25 05:11:23 +00:00
Remove "exec autoexec.cfg" on gamedir change; add checking that frontend.cfg exists before trying to execute it
This commit is contained in:
parent
a05d712277
commit
71af74200b
1 changed files with 9 additions and 4 deletions
|
@ -577,12 +577,17 @@ void CL_ParseServerData (void)
|
|||
//if it exists
|
||||
if (cflag) {
|
||||
snprintf(fn, sizeof(fn), "%s/%s", com_gamedir, "config.cfg");
|
||||
if ((f = Qopen(fn, "rz")) != NULL) {
|
||||
if ((f = Qopen(fn, "r")) != NULL) {
|
||||
Qclose(f);
|
||||
Cbuf_AddText ("cl_warncmd 0\n");
|
||||
Cbuf_AddText ("exec config.cfg\n");
|
||||
Cbuf_AddText ("cl_warncmd 1\n");
|
||||
}
|
||||
snprintf(fn, sizeof(fn), "%s/%s", com_gamedir, "frontend.cfg");
|
||||
if ((f = Qopen(fn, "r")) != NULL) {
|
||||
Qclose(f);
|
||||
Cbuf_AddText ("cl_warncmd 0\n");
|
||||
Cbuf_AddText ("exec frontend.cfg\n");
|
||||
Cbuf_AddText("exec autoexec.cfg\n");
|
||||
Cbuf_AddText ("cl_warncmd 1\n");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue