bug 2810 once a latched cvar was changed it could not be reset to its original value

This commit is contained in:
Tony J. White = 2006-08-01 16:51:13 +00:00
parent 635e8bc326
commit 583745769d

View file

@ -331,7 +331,11 @@ cvar_t *Cvar_Set2( const char *var_name, const char *value, qboolean force ) {
value = var->resetString; 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; return var;
} }
// note what types of cvars have been modified (userinfo, archive, serverinfo, systeminfo) // note what types of cvars have been modified (userinfo, archive, serverinfo, systeminfo)