mirror of
https://git.code.sf.net/p/quake/quakeforge-old
synced 2024-11-24 21:01:17 +00:00
preserve cl_warncmd across gamedir changes
This commit is contained in:
parent
bbbd94d707
commit
d0e1bc6cf7
1 changed files with 3 additions and 3 deletions
|
@ -576,19 +576,18 @@ void CL_ParseServerData (void)
|
||||||
//ZOID--run the autoexec.cfg in the gamedir
|
//ZOID--run the autoexec.cfg in the gamedir
|
||||||
//if it exists
|
//if it exists
|
||||||
if (cflag) {
|
if (cflag) {
|
||||||
|
int cl_warncmd_val = cl_warncmd->value;
|
||||||
snprintf(fn, sizeof(fn), "%s/%s", com_gamedir, "config.cfg");
|
snprintf(fn, sizeof(fn), "%s/%s", com_gamedir, "config.cfg");
|
||||||
if ((f = Qopen(fn, "r")) != NULL) {
|
if ((f = Qopen(fn, "r")) != NULL) {
|
||||||
Qclose(f);
|
Qclose(f);
|
||||||
Cbuf_AddText ("cl_warncmd 0\n");
|
Cbuf_AddText ("cl_warncmd 0\n");
|
||||||
Cbuf_AddText ("exec config.cfg\n");
|
Cbuf_AddText ("exec config.cfg\n");
|
||||||
Cbuf_AddText ("cl_warncmd 1\n");
|
|
||||||
}
|
}
|
||||||
snprintf(fn, sizeof(fn), "%s/%s", com_gamedir, "frontend.cfg");
|
snprintf(fn, sizeof(fn), "%s/%s", com_gamedir, "frontend.cfg");
|
||||||
if ((f = Qopen(fn, "r")) != NULL) {
|
if ((f = Qopen(fn, "r")) != NULL) {
|
||||||
Qclose(f);
|
Qclose(f);
|
||||||
Cbuf_AddText ("cl_warncmd 0\n");
|
Cbuf_AddText ("cl_warncmd 0\n");
|
||||||
Cbuf_AddText ("exec frontend.cfg\n");
|
Cbuf_AddText ("exec frontend.cfg\n");
|
||||||
Cbuf_AddText ("cl_warncmd 1\n");
|
|
||||||
}
|
}
|
||||||
if (cl_autoexec->value) {
|
if (cl_autoexec->value) {
|
||||||
snprintf(fn, sizeof(fn), "%s/%s", com_gamedir, "autoexec.cfg");
|
snprintf(fn, sizeof(fn), "%s/%s", com_gamedir, "autoexec.cfg");
|
||||||
|
@ -596,9 +595,10 @@ void CL_ParseServerData (void)
|
||||||
Qclose(f);
|
Qclose(f);
|
||||||
Cbuf_AddText ("cl_warncmd 0\n");
|
Cbuf_AddText ("cl_warncmd 0\n");
|
||||||
Cbuf_AddText ("exec autoexec.cfg\n");
|
Cbuf_AddText ("exec autoexec.cfg\n");
|
||||||
Cbuf_AddText ("cl_warncmd 1\n");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
snprintf(fn,sizeof(fn), "cl_warncmd %d\n",cl_warncmd_val);
|
||||||
|
Cbuf_AddText(fn);
|
||||||
}
|
}
|
||||||
|
|
||||||
// parse player slot, high bit means spectator
|
// parse player slot, high bit means spectator
|
||||||
|
|
Loading…
Reference in a new issue