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:
Anton E. Gavrilov 2000-05-19 07:48:06 +00:00
parent 0cd42f8b1d
commit 1f97d4fc63

View file

@ -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);
} }