diff options
| author | tjw <tjw@edf5b092-35ff-0310-97b2-ce42778d08ea> | 2006-08-01 16:51:13 +0000 |
|---|---|---|
| committer | tjw <tjw@edf5b092-35ff-0310-97b2-ce42778d08ea> | 2006-08-01 16:51:13 +0000 |
| commit | 598633c369f8478b50e44e5ee4af59db578d1d67 (patch) | |
| tree | dac259e7c1ddec843167e63bf44bc87a07a36eec /code/qcommon | |
| parent | 1f0b1821b64cd755c1d6ec93d42849f928f21c73 (diff) | |
| download | ioquake3-aero-598633c369f8478b50e44e5ee4af59db578d1d67.tar.gz ioquake3-aero-598633c369f8478b50e44e5ee4af59db578d1d67.zip | |
bug 2810 once a latched cvar was changed it could not be reset to its original value
git-svn-id: svn://svn.icculus.org/quake3/trunk@828 edf5b092-35ff-0310-97b2-ce42778d08ea
Diffstat (limited to 'code/qcommon')
| -rw-r--r-- | code/qcommon/cvar.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/code/qcommon/cvar.c b/code/qcommon/cvar.c index a529de6..d9f9e71 100644 --- a/code/qcommon/cvar.c +++ b/code/qcommon/cvar.c @@ -331,7 +331,11 @@ cvar_t *Cvar_Set2( const char *var_name, const char *value, qboolean force ) { value = var->resetString; } - if (!strcmp(value,var->string)) { + if((var->flags & CVAR_LATCH) && var->latchedString) { + if(!strcmp(value,var->latchedString)) + return var; + } + else if (!strcmp(value,var->string)) { return var; } // note what types of cvars have been modified (userinfo, archive, serverinfo, systeminfo) |
