cvar.h File Reference

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

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  cvarListener_s
struct  cvar_s
 This is a cvar defintion. Cvars can be user modified and used in our menus e.g. More...
struct  cvarList_s

Defines

#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)
 Callback for the listener.
typedef struct cvarListener_s cvarChangeListener_t
typedef struct cvar_s cvar_t
 This is a cvar defintion. Cvars can be user modified and used in our menus e.g.
typedef struct cvarList_s cvarList_t

Functions

cvar_tCvar_Get (const char *varName, const char *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
cvar_tCvar_Set (const char *varName, const char *value)
 will create the variable if it doesn't exist
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 NULL if nothing fits
void Cvar_UpdateLatchedVars (void)
 any CVAR_LATCHED variables that have been set will now take effect
qboolean 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 (void)
 returns an info string containing all the CVAR_USERINFO cvars
const char * Cvar_Serverinfo (void)
 returns an info string containing all the CVAR_SERVERINFO cvars
qboolean Cvar_AssertValue (cvar_t *cvar, float minVal, float maxVal, qboolean shouldBeIntegral)
 this function checks cvar ranges and integral values
qboolean Cvar_AssertString (cvar_t *cvar, char **array, int arraySize)
 this function checks whether the cvar string is a valid string in char ** array
qboolean Cvar_SetCheckFunction (const char *varName, qboolean(*check)(cvar_t *cvar))
 Sets the check functions for a cvar (e.g. Cvar_Assert).
void Cvar_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_FixCheatVars (void)
 Reset cheat cvar values to default.
qboolean 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.
qboolean Cvar_PendingCvars (int flags)
 Checks whether there are pending cvars for the given flags.
void Com_SetUserinfoModified (qboolean modified)
qboolean Com_IsUserinfoModified (void)
void Com_SetRenderModified (qboolean modified)
qboolean Com_IsRenderModified (void)
void Cvar_ClearVars (int flags)

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.


Define Documentation

#define CVAR_ARCHIVE   1
#define CVAR_CHEAT   64

clamp to the default value when cheats are off

Definition at line 44 of file cvar.h.

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

#define CVAR_DEVELOPER   32

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

Definition at line 43 of file cvar.h.

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

#define CVAR_LATCH   16

save changes until server restart

Definition at line 42 of file cvar.h.

Referenced by CL_InitParticles(), Cvar_Delete(), Cvar_List_f(), Cvar_Set2(), G_Init(), R_RegisterSystemVars(), SV_Init(), SV_InitGame(), SV_Shutdown(), and UI_Init().

#define CVAR_NOSET   8

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

Definition at line 41 of file cvar.h.

Referenced by CL_InitLocal(), Cvar_Delete(), Cvar_List_f(), Cvar_Set2(), G_Init(), Irc_Init(), Qcommon_Init(), SV_Init(), SV_InitGame(), SV_Map(), and SV_Shutdown().

#define CVAR_R_CONTEXT   256

vid shutdown if such a cvar was modified

Definition at line 46 of file cvar.h.

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

#define CVAR_R_IMAGES   128

effects image filtering

Definition at line 45 of file cvar.h.

Referenced by Cvar_List_f(), R_RegisterImageVars(), R_RegisterSystemVars(), and UI_CheckCvar().

#define CVAR_R_MASK   (CVAR_R_IMAGES | CVAR_R_CONTEXT | CVAR_R_PROGRAMS)

Definition at line 49 of file cvar.h.

Referenced by Cvar_Set2(), and R_Init().

#define CVAR_R_PROGRAMS   512

if changed, shaders are restarted

Definition at line 47 of file cvar.h.

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

#define CVAR_SERVERINFO   4

added to serverinfo when changed

Definition at line 40 of file cvar.h.

Referenced by CL_InitLocal(), Cvar_Delete(), Cvar_Get(), Cvar_List_f(), Cvar_Serverinfo(), Cvar_Set2(), Cvar_Set_f(), G_Init(), Qcommon_Init(), SV_Init(), SV_Map(), and Sys_Init().

#define CVAR_USERINFO   2

Typedef Documentation

typedef struct cvar_s cvar_t

This is a cvar defintion. Cvars can be user modified and used in our menus e.g.

Note:
nothing outside the Cvar_*() functions should modify these fields!
typedef void(* cvarChangeListenerFunc_t)(const char *cvarName, const char *oldValue, const char *newValue)

Callback for the listener.

Parameters:
cvarName The name of the cvar that was changed.
oldValue The old value of the cvar - this is never NULL, but can be empty.
newValue The new value of the cvar - this is never NULL, but can be empty.

Definition at line 57 of file cvar.h.

typedef struct cvarList_s cvarList_t

Function Documentation

qboolean Com_IsRenderModified ( void   ) 

Definition at line 65 of file cvar.c.

References renderModified.

Referenced by R_BeginFrame().

qboolean Com_IsUserinfoModified ( void   ) 

Definition at line 55 of file cvar.c.

References userinfoModified.

Referenced by CL_SendChangedUserinfos().

void Com_SetRenderModified ( qboolean  modified  ) 

Definition at line 60 of file cvar.c.

References renderModified.

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

void Com_SetUserinfoModified ( qboolean  modified  ) 

Definition at line 50 of file cvar.c.

References userinfoModified.

Referenced by CL_Connect(), CL_SendChangedUserinfos(), Cvar_FullSet(), Cvar_Set2(), and Qcommon_Init().

qboolean Cvar_AssertString ( cvar_t cvar,
char **  array,
int  arraySize 
)

this function checks whether the cvar string is a valid string in char ** array

this function checks whether the cvar string is a valid string in char ** array

Returns:
true if assert
See also:
Cvar_AssertValue
Parameters:
[in] cvar Cvar to check
[in] array Array of valid cvar value strings
[in] arraySize Number of entries in the string array

Definition at line 186 of file cvar.c.

References Com_Printf(), Cvar_Set(), i, cvar_s::name, cvar_s::oldString, qfalse, qtrue, cvar_s::string, and string.

qboolean Cvar_AssertValue ( cvar_t cvar,
float  minVal,
float  maxVal,
qboolean  shouldBeIntegral 
)

this function checks cvar ranges and integral values

this function checks cvar ranges and integral values

Returns:
true if assert
Parameters:
[in] cvar Cvar to check
[in] minVal The minimal value the cvar should have
[in] maxVal The maximal value the cvar should have
[in] shouldBeIntegral No floats for this cvar please
See also:
Cvar_AssertString

Definition at line 152 of file cvar.c.

References Com_Printf(), Cvar_Set(), Cvar_SetValue(), cvar_s::integer, cvar_s::name, qfalse, qtrue, va(), and cvar_s::value.

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

void Cvar_ClearVars ( int  flags  ) 

Definition at line 880 of file cvar.c.

References cvar_s::flags, cvar_s::modified, cvar_s::next, and qfalse.

Referenced by R_Init().

qboolean 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 739 of file cvar.c.

References Cmd_Argc(), Cmd_Argv(), Com_Printf(), Cvar_FindVar(), Cvar_Set(), cvar_s::name, qfalse, qtrue, and cvar_s::string.

Referenced by Cmd_ExecuteString().

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

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

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

Parameters:
partial The beginning of the variable we try to complete
[out] match The 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 273 of file cvar.c.

References Cmd_GenericCompleteFunction(), COLORED_GREEN, Com_Printf(), CVAR_DEVELOPER, cvar_s::description, cvar_s::flags, len, MAX_COMPLETE, cvar_s::name, cvar_s::next, and cvar_s::string.

Referenced by Com_ConsoleCompleteCommand().

qboolean Cvar_Delete ( const char *  varName  ) 
cvar_t* Cvar_FindVar ( const char *  varName  ) 
void Cvar_FixCheatVars ( void   ) 
cvar_t* Cvar_ForceSet ( const char *  varName,
const char *  value 
)
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:
varName Which cvar
value Which value for the cvar
flags which flags
See also:
Cvar_Set_f

Definition at line 662 of file cvar.c.

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

Referenced by Cvar_Set_f(), and SV_Map().

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_name The cvar name
[in] var_value The standard cvar value (will be set if the cvar doesn't exist)
[in] flags CVAR_USERINFO, CVAR_LATCH, CVAR_SERVERINFO, CVAR_ARCHIVE and so on
[in] desc This 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 377 of file cvar.c.

References com_cvarSysPool, Com_HashKey(), Com_Printf(), CVAR_CHEAT, Cvar_FindVar(), CVAR_HASH_SIZE, Cvar_InfoValidate(), CVAR_SERVERINFO, CVAR_USERINFO, cvar_s::defaultString, cvar_s::description, cvar_s::flags, hash(), HASH_Add, cvar_s::integer, Mem_Free, Mem_PoolAlloc, Mem_PoolStrDup, cvar_s::modified, cvar_s::name, cvar_s::next, cvar_s::oldString, cvar_s::prev, qtrue, cvar_s::string, and cvar_s::value.

Referenced by ACTOR_InitStartup(), B_InitCallbacks(), B_InitStartup(), CL_CameraInit(), CL_CheckCvars_f(), CL_Init(), CL_InitLocal(), CL_InitParticles(), CL_LanguageTest(), CL_ViewInit(), Con_Init(), CP_InitStartup(), Cvar_FullSet(), Cvar_Set2(), GAME_CP_InitStartup(), GAME_SK_InitStartup(), HTTP_InitStartup(), HUD_InitStartup(), IN_Init(), IN_StartupJoystick(), Irc_Init(), M_Init(), MAP_InitStartup(), MP_CallbacksInit(), MP_ServerListInit(), NET_Init(), PR_ProductionInit(), Qcommon_Init(), R_InitExtensions(), R_RegisterImageVars(), R_RegisterSystemVars(), R_SphereInit(), S_Init(), SAV_Init(), SCR_Init(), SEQ_InitSequence(), SV_Init(), SV_InitGame(), SV_InitGameProgs(), Sys_Init(), TOTD_InitStartup(), UFO_InitStartup(), UFO_InitSuiteRandomMapAssembly(), UI_GenInjectedString(), UI_GetFloatFromExpression(), UI_GetFloatFromNodeProperty(), UI_GetStringFromExpression(), UI_Init(), UI_InitDraw(), UI_InitWindows(), UI_TextEntryFocusGained(), UP_InitStartup(), and VID_Init().

int Cvar_GetInteger ( const char *  varName  ) 
const char* Cvar_GetString ( const char *  varName  ) 
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 112 of file cvar.c.

References Cvar_FindVar(), and cvar_s::string.

Referenced by GAME_MP_StartServer_f(), R_PreprocessShader(), UI_EKGNodeDraw(), UI_GetReferenceFloat(), UI_Modify_f(), and UI_ModifyWrap_f().

void Cvar_Init ( void   ) 

Reads in all archived cvars.

See also:
Qcommon_Init

Definition at line 1113 of file cvar.c.

References Cmd_AddCommand(), Cvar_Add_f(), Cvar_Copy_f(), Cvar_Define_f(), Cvar_Del_f(), Cvar_List_f(), Cvar_Mod_f(), Cvar_Set_f(), and Cvar_SetOld_f().

Referenced by Qcommon_Init(), and TEST_Init().

qboolean Cvar_PendingCvars ( int  flags  ) 

Checks whether there are pending cvars for the given flags.

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

Definition at line 869 of file cvar.c.

References cvar_s::flags, cvar_s::modified, cvar_s::next, qfalse, and qtrue.

Referenced by R_BeginFrame().

void 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:
varName The cvar name to register the listener for
listenerFunc The listener callback to register

Definition at line 460 of file cvar.c.

References cvar_s::changeListener, Com_Printf(), Cvar_FindVar(), Cvar_GetChangeListener(), cvarListener_s::exec, and cvarListener_s::next.

Referenced by HUD_InitStartup().

const char* Cvar_Serverinfo ( void   ) 

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 992 of file cvar.c.

References Cvar_BitInfo(), and CVAR_SERVERINFO.

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

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

will create the variable if it doesn't exist

will create the variable if it doesn't exist

Parameters:
varName Which cvar should be set
value Which value should the cvar get
Note:
Look after the CVAR_LATCH stuff and check for write protected cvars

Definition at line 643 of file cvar.c.

References Cvar_Set2(), and qfalse.

Referenced by AC_AlienClick(), AC_UpdateMenu(), AIM_AircraftEquipMenuUpdate(), AIM_DrawAircraftSlots(), AIM_UpdateItemDescription(), AIR_AircraftSelect(), AIR_DeleteAircraft(), B_BuildingStatus(), B_DrawBuilding(), B_InitCallbacks(), B_SetBaseTitle_f(), B_SetCurrentSelectedBase(), BDEF_BaseDefenceMenuUpdate_f(), BS_BuyType(), BS_BuyType_f(), BS_MarketAircraftDescription(), BS_MarketClick_f(), CL_ActorCvars(), CL_BookmarkAdd_f(), CL_ChangeSkin_f(), CL_CharacterSkillAndScoreCvars(), CL_GameAutoGo(), CL_LanguageTryToSet(), CL_NationDrawStats(), CL_NationStatsUpdate_f(), CL_ParseServerInfoMessage(), CL_SelectTeam_Init_f(), CL_UGVCvars(), CL_UpdateActorAircraftVar(), CL_UpdateCredits(), CL_UpdateEmployeeList(), CL_UpdateTime(), Com_Error(), Com_SetGameType(), CP_CreateBattleParameters(), CP_SetMissionVars(), CP_StartMissionMap(), Cvar_AssertString(), Cvar_AssertValue(), Cvar_Command(), Cvar_Copy_f(), Cvar_Define_f(), Cvar_Set_f(), Cvar_SetOld_f(), Cvar_SetValue(), E_EmployeeList_f(), E_EmployeeListScroll_f(), E_UpdateGUICount_f(), GAME_CP_CampaignListClick_f(), GAME_CP_CharacterCvars(), GAME_CP_MissionAutoCheck_f(), GAME_MP_ChangeGametype_f(), GAME_MP_InitStartup(), GAME_MP_MapInfo(), GAME_MP_StartServer_f(), GAME_SK_ChangeEquip_f(), GAME_SK_HideDropships(), GAME_SK_HideUFOs(), GAME_SK_SetMissionParameters(), HOS_UpdateMenu(), HUD_RefreshButtons(), HUD_Update(), HUD_UpdateActor(), HUD_UpdateActorCvar(), IN_StartupJoystick(), INS_DestroyInstallation(), INS_InitCallbacks(), INS_LoadXML(), INS_ParseInstallations(), INS_SelectInstallation(), INS_SetCurrentSelectedInstallation(), INS_SetInstallationTitle(), INV_ItemDescription(), Irc_Connect_f(), Irc_UserClick_f(), M_Change_f(), M_Play_f(), M_RandomTrack_f(), MAP_DrawMapMarkers(), MAP_DrawMapOneMission(), MP_LoadTeamMultiplayer(), MP_MultiplayerTeamSlotComments_f(), MP_UpdateMenuParameters_f(), PR_AircraftInfo(), PR_DisassemblyInfo(), PR_ItemProductionInfo(), PR_ProductionInfo(), PR_ProductionList_f(), PR_ProductionType_f(), R_InitPrograms(), R_VerifyDriver(), RS_InitGUI(), RS_UpdateInfo(), SAV_GameSaveNameCleanup_f(), SCR_SetLoadingBackground(), SEQ_ExecuteMusic(), SV_GetCvarToken(), SV_Init(), SV_InitGameProgs(), SV_NextMapcycle(), SV_SetMaster_f(), TR_Init_f(), TR_TransferBaseSelect(), UI_EditorNodeSelectNode(), UI_InitStack(), UI_MapInfo(), UI_MaterialEditorUpdate(), UI_Popup(), UI_PopupButton(), UI_PopupList(), UI_SetCvar(), UI_Translate_f(), UP_AircraftDescription(), UP_AircraftItemDescription(), UP_Article(), UP_BuildingDescription(), UP_ChangeDisplay(), UP_DisplayTechTree(), UP_DrawAssociatedAmmo(), UP_GenerateSummary(), UP_GetUnreadMails(), UP_InitStartup(), UP_SetAllMailsRead_f(), UP_SetMailButtons_f(), UP_SetMailHeader(), UP_UGVDescription(), UR_DialogInit_f(), UR_DialogInitStore_f(), and UR_DialogSelectSellNation_f().

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

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 128 of file cvar.c.

References check, cvar_s::check, Com_Printf(), Cvar_FindVar(), qfalse, and qtrue.

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

void Cvar_SetValue ( const char *  varName,
float  value 
)

expands value to a string and calls Cvar_Set

expands value to a string and calls Cvar_Set

Note:
Float values are in the format #.##

Definition at line 696 of file cvar.c.

References Com_sprintf(), and Cvar_Set().

Referenced by AC_UpdateMenu(), AIR_AircraftSelect(), AIR_DeleteAircraft(), B_BaseInit_f(), B_InitCallbacks(), B_MakeBaseMapShot_f(), B_SetCurrentSelectedBase(), B_UpdateBaseCount(), CL_ActorEquipmentSelect_f(), CL_ActorSelectList(), CL_CameraRoute(), CL_ChangeSkin_f(), CL_GameAutoGo(), CL_LevelDown_f(), CL_LevelUp_f(), CL_ParseTeamInfoMessage(), CL_TeamNum_f(), CL_UpdateTime(), CL_ViewCenterAtGridPosition(), Com_DeveloperSet_f(), CP_CampaignInit(), CP_CheckLostCondition(), CP_SetMissionVars(), CP_StartSelectedMission(), CP_UpdateXVIMapButton(), Cvar_Add_f(), Cvar_AssertValue(), Cvar_Mod_f(), E_EmployeeSelect(), E_UpdateGUICount_f(), GAME_MP_StartServer_f(), GAME_SK_SetMissionParameters(), HOS_EmployeeInit_f(), HUD_Update(), HUD_UpdateActorCvar(), HUD_UpdateAllActors(), IN_Frame(), INS_BuildInstallation_f(), INS_InitCallbacks(), INS_UpdateInsatallationLimit_f(), INV_UpdateObject_f(), LE_CenterView(), PR_ProductionIncrease_f(), PR_ProductionInfo(), PR_ProductionList_f(), R_BeginFrame(), R_CvarCheckDynamicLights(), R_CvarCheckLights(), R_CvarCheckMaxLightmap(), R_CvarPostProcess(), R_CvarPrograms(), R_InitExtensions(), R_SetMode(), R_SphereInit(), R_VerifyDriver(), RS_InitGUI(), RS_UpdateInfo(), SCR_TouchPics(), SP_worldspawn(), SV_Map_f(), Sys_SetAffinityAndPriority(), TR_Init_f(), TR_TransferBaseSelect(), UI_GenAllRadarMap(), UI_InvalidateStack(), UI_Modify_f(), UI_ModifyWrap_f(), UI_SetCvar(), UP_Article(), UP_ChangeDisplay(), UP_MailClientClick_f(), and UR_DialogInit_f().

void Cvar_Shutdown ( void   ) 

Definition at line 1125 of file cvar.c.

Referenced by Qcommon_Shutdown(), and TEST_Shutdown().

void Cvar_UnRegisterChangeListener ( const char *  varName,
cvarChangeListenerFunc_t  listenerFunc 
)

Unregisters a cvar change listener.

Parameters:
varName The cvar name to register the listener for
listenerFunc The listener callback to unregister

Definition at line 499 of file cvar.c.

References cvar_s::changeListener, Com_Printf(), Cvar_FindVar(), cvarListener_s::exec, Mem_Free, and cvarListener_s::next.

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 712 of file cvar.c.

References cvar_s::integer, cvar_s::latchedString, cvar_s::next, cvar_s::oldString, cvar_s::string, and cvar_s::value.

Referenced by SV_InitGame().

const char* Cvar_Userinfo ( void   ) 

returns an info string containing all the CVAR_USERINFO cvars

Definition at line 983 of file cvar.c.

References Cvar_BitInfo(), and CVAR_USERINFO.

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

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 253 of file cvar.c.

References Cvar_FindVar(), and cvar_s::oldString.

Referenced by GAME_MP_InitStartup().


Generated by  doxygen 1.6.2