From 9a4dec64f92f474ddb440ac1d97c95275670179c Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Tue, 2 Nov 2021 16:15:54 +0600 Subject: [PATCH] engine: describe protected and privileged cvars --- engine/common/cvar.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/engine/common/cvar.c b/engine/common/cvar.c index e19f3cc8..89584bad 100644 --- a/engine/common/cvar.c +++ b/engine/common/cvar.c @@ -72,7 +72,7 @@ build cvar auto description that based on the setup flags */ const char *Cvar_BuildAutoDescription( int flags ) { - static char desc[128]; + static char desc[256]; desc[0] = '\0'; @@ -92,6 +92,12 @@ const char *Cvar_BuildAutoDescription( int flags ) if( FBitSet( flags, FCVAR_ARCHIVE )) 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 )); return desc; @@ -992,7 +998,7 @@ Reads in all archived cvars void Cvar_Init( void ) { 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 Cmd_AddRestrictedCommand( "setgl", Cvar_SetGL_f, "change the value of a opengl variable" ); // OBSOLETE