1
0
Fork 0
forked from fte/fteqw

Fix q3 when going into controls menu.

This commit is contained in:
Shpoike 2023-01-19 04:32:01 +00:00
parent 6a419833a8
commit 5786b43a7d
2 changed files with 8 additions and 1 deletions

View file

@ -912,6 +912,9 @@ static cvar_t *Cvar_SetCore (cvar_t *var, const char *value, qboolean force)
return NULL; return NULL;
} }
if (!value)
value = var->defaultstr;
if (force) if (force)
; ;
else if (0)//var->flags & CVAR_SERVEROVERRIDE && !force) else if (0)//var->flags & CVAR_SERVEROVERRIDE && !force)

View file

@ -514,7 +514,11 @@ static int QDECL Plug_Cmd_Argc(void)
//void Cvar_SetString (char *name, char *value); //void Cvar_SetString (char *name, char *value);
static void QDECL Plug_Cvar_SetString(const char *name, const char *value) static void QDECL Plug_Cvar_SetString(const char *name, const char *value)
{ {
cvar_t *var = Cvar_Get(name, value, 0, "Plugin vars"); cvar_t *var;
if (!value)
var = Cvar_FindVar(name);
else
var = Cvar_Get(name, value, 0, "Plugin vars");
if (var) if (var)
Cvar_Set(var, value); Cvar_Set(var, value);
} }