cvar saving: do not save all ALLOCATED cvars (seta), only save all cvars that were...
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 3 Dec 2010 10:26:23 +0000 (10:26 +0000)
committerdivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 3 Dec 2010 10:26:23 +0000 (10:26 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10646 d7cf8633-e32d-0410-b094-e92efae38249

cvar.c

diff --git a/cvar.c b/cvar.c
index 4696034..b254593 100644 (file)
--- a/cvar.c
+++ b/cvar.c
@@ -756,7 +756,7 @@ void Cvar_WriteVariables (qfile_t *f)
 
        // don't save cvars that match their default value
        for (var = cvar_vars ; var ; var = var->next)
-               if ((var->flags & CVAR_SAVE) && (strcmp(var->string, var->defstring) || (var->flags & CVAR_ALLOCATED)))
+               if ((var->flags & CVAR_SAVE) && (strcmp(var->string, var->defstring) || !(var->flags & CVAR_DEFAULTSET)))
                {
                        Cmd_QuoteString(buf1, sizeof(buf1), var->name, "\"\\$");
                        Cmd_QuoteString(buf2, sizeof(buf2), var->string, "\"\\$");