]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - cvar.c
fixed bug that was causing seta commands to usually not save to config.cfg (due to...
[xonotic/darkplaces.git] / cvar.c
diff --git a/cvar.c b/cvar.c
index 8e125cbe349d201de51fc00d9ab3f004efd3455e..d3df0c421ebc71fce219e56cfe59b2c10e525ddd 100644 (file)
--- a/cvar.c
+++ b/cvar.c
@@ -578,7 +578,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))
+               if ((var->flags & CVAR_SAVE) && (strcmp(var->string, var->defstring) || (var->flags & CVAR_ALLOCATED)))
                        FS_Printf(f, "%s%s \"%s\"\n", var->flags & CVAR_ALLOCATED ? "seta " : "", var->name, var->string);
 }