UFO: Alien Invasion
Loading...
Searching...
No Matches
cvar.h File Reference

Cvar (console variable) header file. More...

Include dependency graph for cvar.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  cvarChangeListener_t
struct  cvar_t
 This is a cvar definition. Cvars can be user modified and used in our menus e.g. More...
struct  cvarList_t
class  CvarListener
 Listener for cvar changes. More...

Macros

#define CVAR_ARCHIVE   1
#define CVAR_USERINFO   2
#define CVAR_SERVERINFO   4
#define CVAR_NOSET   8
#define CVAR_LATCH   16
#define CVAR_DEVELOPER   32
#define CVAR_CHEAT   64
#define CVAR_R_IMAGES   128
#define CVAR_R_CONTEXT   256
#define CVAR_R_PROGRAMS   512
#define CVAR_R_MASK   (CVAR_R_IMAGES | CVAR_R_CONTEXT | CVAR_R_PROGRAMS)

Typedefs

typedef void(* cvarChangeListenerFunc_t) (const char *cvarName, const char *oldValue, const char *newValue, void *data)
 Callback for the change listener.
typedef SharedPtr< CvarListenerCvarListenerPtr

Functions

cvar_tCvar_GetFirst (void)
 Return the first cvar of the cvar list.
cvar_tCvar_Get (const char *varName, const char *value="", int flags=0, const char *desc=nullptr)
 creates the variable if it doesn't exist, or returns the existing one if it exists, the value will not be changed, but flags will be ORed in that allows variables to be unarchived without needing bitflags
cvar_tCvar_Set (const char *varName, const char *value,...) __attribute__((format(__printf__
 will create the variable if it doesn't exist
cvar_t cvar_tCvar_ForceSet (const char *varName, const char *value)
 will set the variable even if NOSET or LATCH
cvar_tCvar_FullSet (const char *varName, const char *value, int flags)
 Sets a cvar from console with the given flags.
void Cvar_SetValue (const char *varName, float value)
 expands value to a string and calls Cvar_Set
int Cvar_GetInteger (const char *varName)
 returns 0 if not defined or non numeric
float Cvar_GetValue (const char *varName)
 returns 0.0 if not defined or non numeric
const char * Cvar_GetString (const char *varName)
 returns an empty string if not defined
const char * Cvar_VariableStringOld (const char *varName)
 returns an empty string if not defined
int Cvar_CompleteVariable (const char *partial, const char **match)
 attempts to match a partial variable name for command line completion returns nullptr if nothing fits
void Cvar_UpdateLatchedVars (void)
 any CVAR_LATCHED variables that have been set will now take effect
bool Cvar_Command (void)
 called by Cmd_ExecuteString when Cmd_Argv(0) doesn't match a known command. Returns true if the command was a variable reference that was handled. (print or change)
void Cvar_Init (void)
 Reads in all archived cvars.
void Cvar_Shutdown (void)
const char * Cvar_Userinfo (char *info, size_t infoSize)
 returns an info string containing all the CVAR_USERINFO cvars
const char * Cvar_Serverinfo (char *info, size_t infoSize)
 returns an info string containing all the CVAR_SERVERINFO cvars
bool Cvar_AssertValue (cvar_t *cvar, float minVal, float maxVal, bool shouldBeIntegral)
 this function checks cvar ranges and integral values
bool Cvar_SetCheckFunction (const char *varName, bool(*check)(cvar_t *cvar))
 Sets the check functions for a cvar (e.g. Cvar_Assert).
cvarChangeListener_tCvar_RegisterChangeListener (const char *varName, cvarChangeListenerFunc_t listenerFunc)
 Registers a listener that is executed each time a cvar changed its value.
void Cvar_UnRegisterChangeListener (const char *varName, cvarChangeListenerFunc_t listenerFunc)
 Unregisters a cvar change listener.
void Cvar_RegisterCvarListener (CvarListenerPtr listener)
 Registers a cvar listener.
void Cvar_UnRegisterCvarListener (CvarListenerPtr listener)
 Unregisters a cvar listener.
void Cvar_FixCheatVars (void)
 Reset cheat cvar values to default.
bool Cvar_Delete (const char *varName)
 Function to remove the cvar and free the space.
cvar_tCvar_FindVar (const char *varName)
 Searches for a cvar given by parameter.
bool Cvar_PendingCvars (int flags)
 Checks whether there are pending cvars for the given flags.
void Com_SetUserinfoModified (bool modified)
bool Com_IsUserinfoModified (void)
void Com_SetRenderModified (bool modified)
bool Com_IsRenderModified (void)
void Cvar_ClearVars (int flags)
void Cvar_Reset (cvar_t *cvar)
 Sets the cvar value back to the old value.

Detailed Description

Cvar (console variable) header file.

cvar_t variables are used to hold scalar or string variables that can be changed or displayed at the console or prog code as well as accessed directly in C code. The user can access cvars from the console in three ways: r_draworder prints the current value r_draworder 0 sets the current value to 0 set r_draworder 0 as above, but creates the cvar if not present Cvars are restricted from having the same names as commands to keep this interface from being ambiguous.

Definition in file cvar.h.

Macro Definition Documentation

◆ CVAR_ARCHIVE

◆ CVAR_CHEAT

#define CVAR_CHEAT   64

clamp to the default value when cheats are off

Definition at line 46 of file cvar.h.

Referenced by Cvar_FixCheatVars(), Cvar_Get(), and G_Init().

◆ CVAR_DEVELOPER

#define CVAR_DEVELOPER   32

set from commandline (not from within the game) and hide from console

Definition at line 45 of file cvar.h.

Referenced by CP_InitStartup(), Cvar_CompleteVariable(), Cvar_List_f(), Cvar_Set2(), G_Init(), GEO_InitStartup(), UFO_InitStartup(), and UI_Init().

◆ CVAR_LATCH

#define CVAR_LATCH   16

save changes until server restart

Definition at line 44 of file cvar.h.

Referenced by Cvar_List_f(), Cvar_Set2(), Cvar_Set_f(), Cvar_Switch_f(), G_Init(), HUD_InitStartup(), R_RegisterSystemVars(), S_MumbleInit(), SV_Init(), SV_InitGame(), and SV_Shutdown().

◆ CVAR_NOSET

#define CVAR_NOSET   8

don't allow change from console at all, but can be set from the command line

Definition at line 43 of file cvar.h.

Referenced by CL_InitLocal(), Cvar_List_f(), Cvar_Set2(), Cvar_Set_f(), Cvar_Switch_f(), G_Init(), GAME_SetMode(), Irc_Init(), Qcommon_Init(), GameTest::SetUpTestCase(), SV_Init(), SV_Map(), SV_Shutdown(), and TEST_F().

◆ CVAR_R_CONTEXT

#define CVAR_R_CONTEXT   256

vid shutdown if such a cvar was modified

Definition at line 48 of file cvar.h.

Referenced by CL_Init(), CL_Shutdown(), R_RegisterSystemVars(), and VID_Init().

◆ CVAR_R_IMAGES

#define CVAR_R_IMAGES   128

effects image filtering

Definition at line 47 of file cvar.h.

Referenced by CL_Init(), CL_Shutdown(), Cvar_List_f(), and R_RegisterSystemVars().

◆ CVAR_R_MASK

#define CVAR_R_MASK   (CVAR_R_IMAGES | CVAR_R_CONTEXT | CVAR_R_PROGRAMS)

Definition at line 51 of file cvar.h.

Referenced by Cvar_Set2(), R_BeginFrame(), and R_Init().

◆ CVAR_R_PROGRAMS

#define CVAR_R_PROGRAMS   512

if changed, shaders are restarted

Definition at line 49 of file cvar.h.

Referenced by R_BeginFrame(), R_InitExtensions(), and R_RegisterSystemVars().

◆ CVAR_SERVERINFO

#define CVAR_SERVERINFO   4

◆ CVAR_USERINFO

#define CVAR_USERINFO   2

Typedef Documentation

◆ cvarChangeListenerFunc_t

typedef void(* cvarChangeListenerFunc_t) (const char *cvarName, const char *oldValue, const char *newValue, void *data)

Callback for the change listener.

Parameters
cvarNameThe name of the cvar that was changed.
oldValueThe old value of the cvar - this is never nullptr, but can be empty.
newValueThe new value of the cvar - this is never nullptr, but can be empty.

Definition at line 59 of file cvar.h.

◆ CvarListenerPtr

Definition at line 105 of file cvar.h.

Function Documentation

◆ Com_IsRenderModified()

bool Com_IsRenderModified ( void )

Definition at line 71 of file cvar.cpp.

References renderModified.

Referenced by Cvar_Set(), and R_BeginFrame().

◆ Com_IsUserinfoModified()

bool Com_IsUserinfoModified ( void )

Definition at line 61 of file cvar.cpp.

References userinfoModified.

Referenced by CL_SendChangedUserinfos(), and Cvar_Set().

◆ Com_SetRenderModified()

void Com_SetRenderModified ( bool modified)

Definition at line 66 of file cvar.cpp.

References renderModified.

Referenced by Cvar_Set(), Cvar_Set2(), Qcommon_Init(), and R_BeginFrame().

◆ Com_SetUserinfoModified()

void Com_SetUserinfoModified ( bool modified)

◆ Cvar_AssertValue()

bool Cvar_AssertValue ( cvar_t * cvar,
float minVal,
float maxVal,
bool shouldBeIntegral )

this function checks cvar ranges and integral values

this function checks cvar ranges and integral values

Returns
true if assert isn't true and the cvar was changed to a valid value, false if the new value is ok and nothing was changed.
Parameters
[in]cvarCvar to check
[in]minValThe minimal value the cvar should have
[in]maxValThe maximal value the cvar should have
[in]shouldBeIntegralNo floats for this cvar please

Definition at line 161 of file cvar.cpp.

References Com_Printf(), Cvar_Set(), Cvar_SetValue(), cvar_t::integer, cvar_t::name, and cvar_t::value.

Referenced by CL_CvarCheckVidGamma(), CL_CvarCheckVidMode(), CL_CvarWorldLevel(), Com_CvarCheckMaxFPS(), Cvar_Set(), R_CvarCheckDynamicLights(), R_CvarCheckMaxLightmap(), R_CvarCheckMultisample(), R_CvarCheckWeather(), R_CvarPostProcess(), R_CvarPrograms(), and SV_CheckMaxSoldiersPerPlayer().

◆ Cvar_ClearVars()

void Cvar_ClearVars ( int flags)

Definition at line 891 of file cvar.cpp.

References cvarVars.

Referenced by Cvar_Set(), R_BeginFrame(), and R_Init().

◆ Cvar_Command()

bool Cvar_Command ( void )

called by Cmd_ExecuteString when Cmd_Argv(0) doesn't match a known command. Returns true if the command was a variable reference that was handled. (print or change)

called by Cmd_ExecuteString when Cmd_Argv(0) doesn't match a known command. Returns true if the command was a variable reference that was handled. (print or change)

Returns
True if cvar exists - false otherwise

You can print the current value or set a new value with this function To set a new value for a cvar from within the console just type the cvar name followed by the value. To print the current cvar's value just type the cvar name and hit enter

See also
Cvar_Set_f
Cvar_SetValue
Cvar_Set

Definition at line 708 of file cvar.cpp.

References Cmd_Argc(), Cmd_Argv(), Com_Printf(), Cvar_FindVar(), Cvar_Set(), and v.

Referenced by Cmd_vExecuteString(), and Cvar_Set().

◆ Cvar_CompleteVariable()

int Cvar_CompleteVariable ( const char * partial,
const char ** match )

attempts to match a partial variable name for command line completion returns nullptr if nothing fits

attempts to match a partial variable name for command line completion returns nullptr if nothing fits

Parameters
partialThe beginning of the variable we try to complete
[out]matchThe found entry of the list we are searching, in case of more than one entry their common suffix is returned.
See also
Cmd_CompleteCommand
Key_CompleteCommand

Definition at line 258 of file cvar.cpp.

References Cmd_GenericCompleteFunction(), Com_Printf(), CVAR_DEVELOPER, cvarVars, and S_COLOR_GREEN.

Referenced by Com_ConsoleCompleteCommand(), and Cvar_Set().

◆ Cvar_Delete()

◆ Cvar_FindVar()

◆ Cvar_FixCheatVars()

void Cvar_FixCheatVars ( void )

Reset cheat cvar values to default.

See also
CL_SendCommand

Definition at line 1042 of file cvar.cpp.

References com_cvarSysPool, Com_Printf(), Com_ServerState(), CVAR_CHEAT, Cvar_GetInteger(), cvarVars, Mem_Free, Mem_PoolStrDup, and Q_streq.

Referenced by CL_SendCommand(), and Cvar_Set().

◆ Cvar_ForceSet()

cvar_t cvar_t * Cvar_ForceSet ( const char * varName,
const char * value )

◆ Cvar_FullSet()

cvar_t * Cvar_FullSet ( const char * varName,
const char * value,
int flags )

Sets a cvar from console with the given flags.

Note
flags are: CVAR_ARCHIVE These cvars will be saved. CVAR_USERINFO Added to userinfo when changed. CVAR_SERVERINFO Added to serverinfo when changed. CVAR_NOSET Don't allow change from console at all but can be set from the command line. CVAR_LATCH Save changes until server restart.
Parameters
varNameWhich cvar
valueWhich value for the cvar
flagswhich flags
See also
Cvar_Set_f

Definition at line 640 of file cvar.cpp.

References com_cvarSysPool, Com_SetUserinfoModified(), Cvar_FindVar(), Cvar_Get(), CVAR_USERINFO, cvar_t::flags, cvar_t::integer, Mem_Free, Mem_PoolStrDup, cvar_t::modified, cvar_t::oldString, cvar_t::string, and cvar_t::value.

Referenced by Cvar_Set(), Cvar_Set_f(), Cvar_Switch_f(), GAME_SetMode(), and SV_Map().

◆ Cvar_Get()

cvar_t * Cvar_Get ( const char * var_name,
const char * var_value,
int flags,
const char * desc )

creates the variable if it doesn't exist, or returns the existing one if it exists, the value will not be changed, but flags will be ORed in that allows variables to be unarchived without needing bitflags

creates the variable if it doesn't exist, or returns the existing one if it exists, the value will not be changed, but flags will be ORed in that allows variables to be unarchived without needing bitflags

Parameters
[in]var_nameThe cvar name
[in]var_valueThe standard cvar value (will be set if the cvar doesn't exist)
[in]flagsCVAR_USERINFO, CVAR_LATCH, CVAR_SERVERINFO, CVAR_ARCHIVE and so on
[in]descThis is a short description of the cvar (see console command cvarlist)
Note
CVAR_ARCHIVE: Cvar will be saved to config.cfg when game shuts down - and will be reloaded when game starts up the next time
CVAR_LATCH: Latched cvars will be updated at the next map load
CVAR_SERVERINFO: This cvar will be send in the server info response strings (server browser)
CVAR_NOSET: This cvar can not be set from the commandline
CVAR_USERINFO: This cvar will be added to the userinfo string when changed (network synced)
CVAR_DEVELOPER: Only changeable if we are in development mode If the variable already exists, the value will not be set The flags will be or'ed in if the variable exists.

Definition at line 342 of file cvar.cpp.

References com_cvarSysPool, Com_HashKey(), Com_Printf(), CVAR_CHEAT, Cvar_FindVar(), CVAR_HASH_SIZE, Cvar_InfoValidate(), CVAR_SERVERINFO, CVAR_USERINFO, cvarListeners, cvarVars, cvarVarsHash, cvar_t::defaultString, cvar_t::description, cvar_t::flags, hash, HASH_Add, i, cvar_t::integer, Mem_Free, Mem_PoolAllocType, Mem_PoolStrDup, cvar_t::modified, cvar_t::name, cvar_t::next, cvar_t::oldString, cvar_t::string, and cvar_t::value.

Referenced by _wrap_getvar__SWIG_0(), _wrap_getvar__SWIG_1(), _wrap_getvar__SWIG_2(), _wrap_getvar__SWIG_3(), ACTOR_InitStartup(), CL_CameraInit(), CL_Init(), CL_InitLocal(), CL_LanguageInit(), CL_ViewInit(), Con_Init(), Cvar_FullSet(), Cvar_Set2(), GAME_GetImportData(), HTTP_InitStartup(), HUD_InitStartup(), IN_Init(), IN_StartupJoystick(), Irc_Init(), M_Init(), NET_Init(), uiTextEntryNode::onFocusGained(), PTL_InitStartup(), Qcommon_Init(), R_InitExtensions(), R_RegisterSystemVars(), R_RestartPrograms_f(), R_SphereInit(), S_Init(), S_MumbleInit(), SCR_Init(), CampaignTest::SetUpTestCase(), FootStepTest::SetUpTestCase(), GameTest::SetUpTestCase(), MapDefMassRMATest::SetUpTestCase(), MapDefStatsTest::SetUpTestCase(), MapDefTest::SetUpTestCase(), RandomMapAssemblyTest::SetUpTestCase(), SV_Init(), SV_InitGameProgs(), Sys_Init(), TEST_F(), TEST_F(), TEST_Init(), TOTD_InitStartup(), UI_AbstractOption_SetCvar(), UI_GenInjectedString(), UI_GetFloatFromExpression(), UI_GetFloatFromNodeProperty(), UI_GetStringFromExpression(), UI_Init(), UI_InitDraw(), UI_InitWindows(), UI_RadioButton_SetCvar(), UI_RegisterGeoscapeNode(), VID_Init(), WEB_CGameCvars(), and WEB_InitStartup().

◆ Cvar_GetFirst()

cvar_t * Cvar_GetFirst ( void )

Return the first cvar of the cvar list.

Definition at line 81 of file cvar.cpp.

References cvarVars.

Referenced by CL_Init(), and CL_Shutdown().

◆ Cvar_GetInteger()

int Cvar_GetInteger ( const char * varName)

◆ Cvar_GetString()

const char * Cvar_GetString ( const char * varName)

returns an empty string if not defined

returns an empty string if not defined

See also
Cvar_GetValue
Cvar_FindVar

Even if the cvar does not exist this function will not return a null pointer but an empty string

Definition at line 210 of file cvar.cpp.

References Cvar_FindVar(), and cvar_t::string.

Referenced by CL_BattlescapeRadarGenerate_f(), CL_ConnectionlessPacket(), Cmd_AddCommand(), Cmd_TokenizeString(), Com_MacroExpandString(), Cvar_Copy_f(), Cvar_Set(), FS_InitFilesystem(), GAME_GetEquipment(), GAME_GetImportData(), GAME_GetTeamDef(), Irc_Client_CmdPrivmsg(), M_Play_f(), SV_InitGameProgs(), SV_Map(), SVC_TeamInfo(), TEST_F(), and UI_MaterialEditorUpdate().

◆ Cvar_GetValue()

float Cvar_GetValue ( const char * varName)

returns 0.0 if not defined or non numeric

returns 0.0 if not defined or non numeric

See also
Cvar_GetString
Cvar_FindVar
Cvar_GetInteger
Returns
0 if not defined

Definition at line 125 of file cvar.cpp.

References Cvar_FindVar(), and cvar_t::string.

Referenced by Cvar_Set(), uiGeoscapeNode::draw(), cgame_import_t::float(), GAME_GetImportData(), IN_SetMouseSpace(), R_PreprocessShaderR(), Rimp_Init(), and UI_GetReferenceFloat().

◆ Cvar_Init()

void Cvar_Init ( void )

◆ Cvar_PendingCvars()

bool Cvar_PendingCvars ( int flags)

Checks whether there are pending cvars for the given flags.

Parameters
flagsThe CVAR_* flags
Returns
true if there are pending cvars, false otherwise

Definition at line 881 of file cvar.cpp.

References cvarVars.

Referenced by Cvar_Set(), and R_BeginFrame().

◆ Cvar_RegisterChangeListener()

cvarChangeListener_t * Cvar_RegisterChangeListener ( const char * varName,
cvarChangeListenerFunc_t listenerFunc )

Registers a listener that is executed each time a cvar changed its value.

See also
Cvar_ExecuteChangeListener
Parameters
varNameThe cvar name to register the listener for
listenerFuncThe listener callback to register

Definition at line 446 of file cvar.cpp.

References cvar_t::changeListener, Com_Printf(), Cvar_FindVar(), Cvar_GetChangeListener(), cvarChangeListener_t::exec, and cvarChangeListener_t::next.

Referenced by CL_Init(), Cvar_Set(), HUD_InitStartup(), R_RegisterSystemVars(), UI_AddCvarListener_f(), and UI_CvarListenerNodeBind().

◆ Cvar_RegisterCvarListener()

void Cvar_RegisterCvarListener ( CvarListenerPtr listener)

Registers a cvar listener.

Parameters
listenerThe listener callback to register

Definition at line 406 of file cvar.cpp.

References cvarListeners.

Referenced by Cvar_Set(), and GAME_InitStartup().

◆ Cvar_Reset()

void Cvar_Reset ( cvar_t * cvar)

Sets the cvar value back to the old value.

Parameters
cvarThe cvar to reset

Definition at line 241 of file cvar.cpp.

References Cvar_Set(), Mem_Free, Mem_StrDup, cvar_t::name, and cvar_t::oldString.

Referenced by Cvar_Set(), HUD_CvarCheckMNHud(), and R_CvarGLSLVersionCheck().

◆ Cvar_Serverinfo()

const char * Cvar_Serverinfo ( char * info,
size_t infoSize )

returns an info string containing all the CVAR_SERVERINFO cvars

returns an info string containing all the CVAR_SERVERINFO cvars

See also
SV_StatusString

Definition at line 977 of file cvar.cpp.

References Cvar_BitInfo(), and CVAR_SERVERINFO.

Referenced by Cvar_Set(), SV_Serverinfo_f(), SV_ShowServerinfo_f(), and SVC_Status().

◆ Cvar_Set()

◆ Cvar_SetCheckFunction()

bool Cvar_SetCheckFunction ( const char * varName,
bool(* check )(cvar_t *cvar) )

Sets the check functions for a cvar (e.g. Cvar_Assert).

Sets the check functions for a cvar (e.g. Cvar_Assert).

See also
Cvar_FindVar
Returns
true if set

Definition at line 139 of file cvar.cpp.

References cvar_t::check, Com_Printf(), and Cvar_FindVar().

Referenced by Cvar_Set(), HUD_InitStartup(), Qcommon_Init(), R_InitExtensions(), R_RegisterSystemVars(), SV_Init(), and VID_Init().

◆ Cvar_SetValue()

◆ Cvar_Shutdown()

void Cvar_Shutdown ( void )

Definition at line 1100 of file cvar.cpp.

References cvarVars, cvarVarsHash, and OBJZERO.

Referenced by Cvar_Set(), Qcommon_Shutdown(), and TEST_Shutdown().

◆ Cvar_UnRegisterChangeListener()

void Cvar_UnRegisterChangeListener ( const char * varName,
cvarChangeListenerFunc_t listenerFunc )

Unregisters a cvar change listener.

Parameters
varNameThe cvar name to register the listener for
listenerFuncThe listener callback to unregister

Definition at line 487 of file cvar.cpp.

References cvar_t::changeListener, Com_Printf(), Cvar_FindVar(), cvarChangeListener_t::exec, Mem_Free, and cvarChangeListener_t::next.

Referenced by CL_Shutdown(), Cvar_Set(), uiCvarNode::onWindowClosed(), and UI_RemoveCvarListener_f().

◆ Cvar_UnRegisterCvarListener()

void Cvar_UnRegisterCvarListener ( CvarListenerPtr listener)

Unregisters a cvar listener.

Parameters
listenerThe listener callback to unregister

Definition at line 415 of file cvar.cpp.

References cvarListeners.

Referenced by Cvar_Set(), and GAME_Shutdown().

◆ Cvar_UpdateLatchedVars()

void Cvar_UpdateLatchedVars ( void )

any CVAR_LATCHED variables that have been set will now take effect

any CVAR_LATCHED variables that have been set will now take effect

Note
CVAR_LATCH cvars are not updated during a game (tactical mission)

Definition at line 683 of file cvar.cpp.

References cvarVars.

Referenced by Cvar_Set(), and SV_InitGame().

◆ Cvar_Userinfo()

const char * Cvar_Userinfo ( char * info,
size_t infoSize )

returns an info string containing all the CVAR_USERINFO cvars

returns an info string containing all the CVAR_USERINFO cvars

Definition at line 967 of file cvar.cpp.

References Cvar_BitInfo(), and CVAR_USERINFO.

Referenced by CL_Connect(), CL_SendChangedUserinfos(), CL_UserInfo_f(), Cvar_Set(), and TEST_F().

◆ Cvar_VariableStringOld()

const char * Cvar_VariableStringOld ( const char * varName)

returns an empty string if not defined

returns an empty string if not defined

See also
Cvar_GetValue
Cvar_FindVar

Even if the cvar does not exist this function will not return a null pointer but an empty string

Definition at line 226 of file cvar.cpp.

References Cvar_FindVar(), and cvar_t::oldString.

Referenced by Cvar_Set(), and GAME_GetImportData().