Browse Source

engine: describe protected and privileged cvars

pull/2/head
Alibek Omarov 3 years ago committed by a1batross
parent
commit
9a4dec64f9
  1. 10
      engine/common/cvar.c

10
engine/common/cvar.c

@ -72,7 +72,7 @@ build cvar auto description that based on the setup flags
*/ */
const char *Cvar_BuildAutoDescription( int flags ) const char *Cvar_BuildAutoDescription( int flags )
{ {
static char desc[128]; static char desc[256];
desc[0] = '\0'; desc[0] = '\0';
@ -92,6 +92,12 @@ const char *Cvar_BuildAutoDescription( int flags )
if( FBitSet( flags, FCVAR_ARCHIVE )) if( FBitSet( flags, FCVAR_ARCHIVE ))
Q_strncat( desc, "archived ", sizeof( desc )); Q_strncat( desc, "archived ", sizeof( desc ));
if( FBitSet( flags, FCVAR_PROTECTED ))
Q_strncat( desc, "protected ", sizeof( desc ));
if( FBitSet( flags, FCVAR_LOCALONLY ))
Q_strncat( desc, "privileged ", sizeof( desc ));
Q_strncat( desc, "cvar", sizeof( desc )); Q_strncat( desc, "cvar", sizeof( desc ));
return desc; return desc;
@ -992,7 +998,7 @@ Reads in all archived cvars
void Cvar_Init( void ) void Cvar_Init( void )
{ {
cvar_vars = NULL; cvar_vars = NULL;
cmd_scripting = Cvar_Get( "cmd_scripting", "0", FCVAR_ARCHIVE, "enable simple condition checking and variable operations" ); cmd_scripting = Cvar_Get( "cmd_scripting", "0", FCVAR_ARCHIVE|FCVAR_LOCALONLY, "enable simple condition checking and variable operations" );
Cvar_RegisterVariable (&host_developer); // early registering for dev Cvar_RegisterVariable (&host_developer); // early registering for dev
Cmd_AddRestrictedCommand( "setgl", Cvar_SetGL_f, "change the value of a opengl variable" ); // OBSOLETE Cmd_AddRestrictedCommand( "setgl", Cvar_SetGL_f, "change the value of a opengl variable" ); // OBSOLETE

Loading…
Cancel
Save