diff options
author | thilo <thilo@edf5b092-35ff-0310-97b2-ce42778d08ea> | 2008-05-01 14:56:57 +0000 |
---|---|---|
committer | thilo <thilo@edf5b092-35ff-0310-97b2-ce42778d08ea> | 2008-05-01 14:56:57 +0000 |
commit | b863dd098c133889a2c66b60218306e2b3b81fb4 (patch) | |
tree | 353a5737cc8fd3d3b22e8fc54217ad960e404186 /code/qcommon | |
parent | e02f31a31c7cf4bccb2bbaaf5cbc0565be173552 (diff) | |
download | ioquake3-aero-b863dd098c133889a2c66b60218306e2b3b81fb4.tar.gz ioquake3-aero-b863dd098c133889a2c66b60218306e2b3b81fb4.zip |
- replace a few constant values with GL macros in tr_cmds.c
- tidy up top of tr_types.h a bit, change flags to hex representation
- make ROM cvar enforcing really work
- remove cg_stereoSeparation from cgame as it is obsolete.
- Add CG_DrawCrosshair3D so people see crosshair correctly when stereoseparation is enabled
git-svn-id: svn://svn.icculus.org/quake3/trunk@1335 edf5b092-35ff-0310-97b2-ce42778d08ea
Diffstat (limited to 'code/qcommon')
-rw-r--r-- | code/qcommon/cvar.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/code/qcommon/cvar.c b/code/qcommon/cvar.c index 9dfff2e..2526e38 100644 --- a/code/qcommon/cvar.c +++ b/code/qcommon/cvar.c @@ -228,6 +228,17 @@ cvar_t *Cvar_Get( const char *var_name, const char *var_value, int flags ) { Z_Free( var->resetString ); var->resetString = CopyString( var_value ); + if(flags & CVAR_ROM) + { + // this variable was set by the user, + // so force it to value given by the engine. + + if(var->latchedString) + Z_Free(var->latchedString); + + var->latchedString = CopyString(var_value); + } + // ZOID--needs to be set so that cvars the game sets as // SERVERINFO get sent to clients cvar_modifiedFlags |= flags; @@ -239,16 +250,6 @@ cvar_t *Cvar_Get( const char *var_name, const char *var_value, int flags ) { // we don't have a reset string yet Z_Free( var->resetString ); var->resetString = CopyString( var_value ); - - // if there is no reset string yet this means the variable was set by the user, - // so force it to value given by the engine. - if(var->flags & CVAR_ROM) - { - if(var->latchedString) - Z_Free(var->latchedString); - - var->latchedString = CopyString(var_value); - } } else if ( var_value[0] && strcmp( var->resetString, var_value ) ) { Com_DPrintf( "Warning: cvar \"%s\" given initial values: \"%s\" and \"%s\"\n", var_name, var->resetString, var_value ); |