From d259630fef9ed18f78a826484c942c20fe00cc21 Mon Sep 17 00:00:00 2001 From: divverent Date: Fri, 3 Dec 2010 10:26:23 +0000 Subject: [PATCH] cvar saving: do not save all ALLOCATED cvars (seta), only save all cvars that were not locked in by cvar_lockdefaults, so default.cfg-created cvars do not always spam the config file git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10646 d7cf8633-e32d-0410-b094-e92efae38249 --- cvar.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cvar.c b/cvar.c index 4696034a..b2545934 100644 --- 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, "\"\\$"); -- 2.39.2