mirror of
https://git.code.sf.net/p/quake/newtree
synced 2024-12-02 00:43:44 +00:00
Added checking of cvar aliases in PF_cvar_set();
Added a warning message when the cvar is not found (should that be DPrint?).
This commit is contained in:
parent
0cd42f8b1d
commit
1f97d4fc63
1 changed files with 8 additions and 0 deletions
|
@ -760,6 +760,14 @@ void PF_cvar_set (void)
|
||||||
var_name = G_STRING(OFS_PARM0);
|
var_name = G_STRING(OFS_PARM0);
|
||||||
val = G_STRING(OFS_PARM1);
|
val = G_STRING(OFS_PARM1);
|
||||||
var = Cvar_FindVar(var_name);
|
var = Cvar_FindVar(var_name);
|
||||||
|
if (!var)
|
||||||
|
var = Cvar_FindAlias(var_name);
|
||||||
|
if (!var)
|
||||||
|
{
|
||||||
|
// FIXME: make Con_DPrint?
|
||||||
|
Con_Printf ("PF_cvar_set: variable %s not found\n", var_name);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
Cvar_Set (var, val);
|
Cvar_Set (var, val);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue