mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-18 07:22:28 +00:00
How'd this happen...?
This commit is contained in:
parent
5fac6f542e
commit
d87f2565f1
1 changed files with 4 additions and 9 deletions
|
@ -2110,20 +2110,15 @@ void CV_SaveVariables(FILE *f)
|
||||||
for (cvar = consvar_vars; cvar; cvar = cvar->next)
|
for (cvar = consvar_vars; cvar; cvar = cvar->next)
|
||||||
if (cvar->flags & CV_SAVE)
|
if (cvar->flags & CV_SAVE)
|
||||||
{
|
{
|
||||||
char stringtrite[MAXTEXTCMD+1];
|
char stringtowrite[MAXTEXTCMD+1];
|
||||||
|
|
||||||
// Silly hack for Min/Max vars
|
// Silly hack for Min/Max vars
|
||||||
if (!strcmp(cvar->string, "MAX") || !strcmp(cvar->string, "MIN"))
|
if (!strcmp(cvar->string, "MAX") || !strcmp(cvar->string, "MIN"))
|
||||||
{
|
|
||||||
if (cvar->flags & CV_FLOAT)
|
|
||||||
sprintf(stringtowrite, "%f", FIXED_TO_FLOAT(cvar->value));
|
|
||||||
else
|
|
||||||
sprintf(stringtowrite, "%d", cvar->value);
|
sprintf(stringtowrite, "%d", cvar->value);
|
||||||
}
|
|
||||||
else
|
else
|
||||||
strcpy(stringtrite, cvar->string);
|
strcpy(stringtowrite, cvar->string);
|
||||||
|
|
||||||
fprintf(f, "%s \"%s\"\n", cvar->name, stringtrite);
|
fprintf(f, "%s \"%s\"\n", cvar->name, stringtowrite);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue