r828 - trunk/code/qcommon

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Tue Aug 1 12:51:14 EDT 2006


Author: tjw
Date: 2006-08-01 12:51:13 -0400 (Tue, 01 Aug 2006)
New Revision: 828

Modified:
   trunk/code/qcommon/cvar.c
Log:
bug 2810 once a latched cvar was changed it could not be reset to its original value

Modified: trunk/code/qcommon/cvar.c
===================================================================
--- trunk/code/qcommon/cvar.c	2006-08-01 11:41:49 UTC (rev 827)
+++ trunk/code/qcommon/cvar.c	2006-08-01 16:51:13 UTC (rev 828)
@@ -331,7 +331,11 @@
 		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)




More information about the quake3-commits mailing list