diff --git a/source/cl_main.c b/source/cl_main.c index bc0b3e1..8fa741c 100644 --- a/source/cl_main.c +++ b/source/cl_main.c @@ -90,7 +90,7 @@ cvar_t *cl_timeout; /* cvar_t cl_shownet = {"cl_shownet","0"}; // can be 0, 1, or 2 CVAR_FIXME */ cvar_t *cl_shownet; // can be 0, 1, or 2 - +cvar_t *cl_autoexec; /* cvar_t cl_sbar = {"cl_sbar", "0", true}; CVAR_FIXME */ cvar_t *cl_sbar; @@ -1288,8 +1288,7 @@ void CL_InitCvars (void) CVAR_FIXME */ developer = Cvar_Get("developer", "0", CVAR_NONE, "None"); -/* Cvar_RegisterVariable (&cl_warncmd); - CVAR_FIXME */ + cl_autoexec = Cvar_Get ("cl_autoexec","0",CVAR_ROM,"exec autoexec.cfg on gamedir change"); cl_warncmd = Cvar_Get("cl_warncmd", "0", CVAR_NONE, "None"); /* Cvar_RegisterVariable (&cl_upspeed); CVAR_FIXME */ diff --git a/source/cl_parse.c b/source/cl_parse.c index bbc4c60..09870f6 100644 --- a/source/cl_parse.c +++ b/source/cl_parse.c @@ -44,6 +44,7 @@ /* extern cvar_t gl_flashblend; CVAR_FIXME */ extern cvar_t *gl_flashblend; +extern cvar_t *cl_autoexec; char *svc_strings[] = { @@ -596,14 +597,14 @@ void CL_ParseServerData (void) Cbuf_AddText ("cl_warncmd 0\n"); Cbuf_AddText ("exec frontend.cfg\n"); } -/* if (cl_autoexec->value) { + if (cl_autoexec->value) { snprintf(fn, sizeof(fn), "%s/%s", com_gamedir, "autoexec.cfg"); if ((f = Qopen(fn, "r")) != NULL) { Qclose(f); Cbuf_AddText ("cl_warncmd 0\n"); Cbuf_AddText ("exec autoexec.cfg\n"); } - } */ + } snprintf(fn,sizeof(fn), "cl_warncmd %d\n", cl_warncmd_val); Cbuf_AddText(fn); }