mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-15 09:11:48 +00:00
Fix float cvars saving wrong when set to max
This commit is contained in:
parent
bc2ed52625
commit
0047dba279
1 changed files with 6 additions and 1 deletions
|
@ -2060,7 +2060,12 @@ void CV_SaveVariables(FILE *f)
|
||||||
|
|
||||||
// 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(stringtowrite, cvar->string);
|
strcpy(stringtowrite, cvar->string);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue