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;
}
if (!value)
value = var->defaultstr;
if (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);
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)
Cvar_Set(var, value);
}