From: divverent Date: Fri, 3 Dec 2010 10:26:23 +0000 (+0000) Subject: cvar saving: do not save all ALLOCATED cvars (seta), only save all cvars that were... X-Git-Tag: xonotic-v0.5.0~438^2~195 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=d259630fef9ed18f78a826484c942c20fe00cc21;p=xonotic%2Fdarkplaces.git 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 --- 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, "\"\\$");