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 = committed 2006-08-01 16:51:13 +00:00
1 parent 635e8bc326
commit 583745769d
1 file changed
+5 -1
+5 -1
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)