From 598633c369f8478b50e44e5ee4af59db578d1d67 Mon Sep 17 00:00:00 2001 From: tjw Date: Tue, 1 Aug 2006 16:51:13 +0000 Subject: 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 --- code/qcommon/cvar.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'code/qcommon/cvar.c') 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) -- cgit v1.2.3