engine: add filterable flag support for cvars and cmds
This commit is contained in:
parent
a3d6e7bcfe
commit
8599119c8d
2 changed files with 8 additions and 2 deletions
|
@ -952,6 +952,9 @@ static qboolean Cmd_ShouldAllowCommand( cmd_t *cmd, qboolean isPrivileged )
|
|||
if( cl_filterstuffcmd.value <= 0.0f )
|
||||
return true;
|
||||
|
||||
if( FBitSet( cmd->flags, CMD_FILTERABLE ))
|
||||
return false;
|
||||
|
||||
for( i = 0; i < ARRAYSIZE( prefixes ); i++ )
|
||||
{
|
||||
if( !Q_stricmp( cmd->name, prefixes[i] ))
|
||||
|
|
|
@ -769,15 +769,18 @@ static qboolean Cvar_ShouldSetCvar( convar_t *v, qboolean isPrivileged )
|
|||
if( isPrivileged )
|
||||
return true;
|
||||
|
||||
if( v->flags & FCVAR_PRIVILEGED )
|
||||
if( FBitSet( v->flags, FCVAR_PRIVILEGED ))
|
||||
return false;
|
||||
|
||||
if( cl_filterstuffcmd.value <= 0.0f )
|
||||
return true;
|
||||
|
||||
if( FBitSet( v->flags, FCVAR_FILTERABLE ))
|
||||
return false;
|
||||
|
||||
for( i = 0; i < ARRAYSIZE( prefixes ); i++ )
|
||||
{
|
||||
if( Q_stricmp( v->name, prefixes[i] ))
|
||||
if( !Q_stricmp( v->name, prefixes[i] ))
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue