diff options
-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) |