mirror of
https://github.com/UberGames/lilium-voyager.git
synced 2024-11-10 06:31:47 +00:00
Fix the behaviour of CVAR_LATCH|CVAR_CHEAT cvars
Fix the output/behaviour of CVAR_CHEAT flagged cvars in case they are also of type CVAR_LATCH (avoid the early latch case return to make it work as intended).
This commit is contained in:
parent
b8ee77cecc
commit
63e59a4591
1 changed files with 6 additions and 7 deletions
|
@ -569,6 +569,12 @@ cvar_t *Cvar_Set2( const char *var_name, const char *value, qboolean force ) {
|
|||
return var;
|
||||
}
|
||||
|
||||
if ((var->flags & CVAR_CHEAT) && !cvar_cheats->integer)
|
||||
{
|
||||
Com_Printf ("%s is cheat protected.\n", var_name);
|
||||
return var;
|
||||
}
|
||||
|
||||
if (var->flags & CVAR_LATCH)
|
||||
{
|
||||
if (var->latchedString)
|
||||
|
@ -589,13 +595,6 @@ cvar_t *Cvar_Set2( const char *var_name, const char *value, qboolean force ) {
|
|||
var->modificationCount++;
|
||||
return var;
|
||||
}
|
||||
|
||||
if ( (var->flags & CVAR_CHEAT) && !cvar_cheats->integer )
|
||||
{
|
||||
Com_Printf ("%s is cheat protected.\n", var_name);
|
||||
return var;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue