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
1 changed files with 5 additions and 1 deletions

View File

@ -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)