mirror of
https://github.com/ZDoom/gzdoom.git
synced 2025-01-19 08:01:50 +00:00
rename reset command to resetcvar and do not create a new CVAR
This commit is contained in:
parent
18a8fafd7d
commit
92d68d05db
1 changed files with 4 additions and 6 deletions
|
@ -1497,19 +1497,17 @@ CCMD (unset)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
CCMD (reset)
|
CCMD (resetcvar)
|
||||||
{
|
{
|
||||||
if (argv.argc() != 2)
|
if (argv.argc() != 2)
|
||||||
{
|
{
|
||||||
Printf ("usage: reset <variable>\n");
|
Printf ("usage: resetcvar <variable>\n");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
FBaseCVar *var = FindCVar (argv[1], NULL);
|
FBaseCVar *var = FindCVar (argv[1], NULL);
|
||||||
if (var == NULL)
|
if (var != NULL)
|
||||||
var = new FStringCVar (argv[1], NULL, CVAR_AUTO | CVAR_UNSETTABLE | cvar_defflags);
|
var->ResetToDefault();
|
||||||
|
|
||||||
var->ResetToDefault();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue