Added cheat flag for console variables

CVAR with this flag can be set in console or from command line when sv_cheats is enabled
There is no such restriction for changing its value from ACS, via SetCVar() and related functions
'cheat' modifier can be used in CVARINFO lump to create variable of this kind
This commit is contained in:
alexey.lysiuk 2017-01-31 11:05:29 +02:00 committed by Christoph Oelckers
commit 6225f60eb2
3 changed files with 13 additions and 0 deletions

View file

@ -1398,6 +1398,10 @@ void ParseCVarInfo()
{
cvarflags &= ~CVAR_ARCHIVE;
}
else if (stricmp(sc.String, "cheat") == 0)
{
cvarflags |= CVAR_CHEAT;
}
else
{
sc.ScriptError("Unknown cvar attribute '%s'", sc.String);