mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-15 01:01:33 +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
|
||||
if (!strcmp(cvar->string, "MAX") || !strcmp(cvar->string, "MIN"))
|
||||
sprintf(stringtowrite, "%d", cvar->value);
|
||||
{
|
||||
if (cvar->flags & CV_FLOAT)
|
||||
sprintf(stringtowrite, "%f", FIXED_TO_FLOAT(cvar->value));
|
||||
else
|
||||
sprintf(stringtowrite, "%d", cvar->value);
|
||||
}
|
||||
else
|
||||
strcpy(stringtowrite, cvar->string);
|
||||
|
||||
|
|
Loading…
Reference in a new issue