mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-15 01:01:33 +00:00
Support adding to CV_FLOAT cvars with the Add command
This commit is contained in:
parent
135619af8b
commit
f0ee901160
1 changed files with 4 additions and 1 deletions
|
@ -836,7 +836,10 @@ static void COM_Add_f(void)
|
|||
return;
|
||||
}
|
||||
|
||||
CV_AddValue(cvar, atoi(COM_Argv(2)));
|
||||
if (( cvar->flags & CV_FLOAT ))
|
||||
CV_Set(cvar, va("%f", FIXED_TO_FLOAT (cvar->value) + atof(COM_Argv(2))));
|
||||
else
|
||||
CV_AddValue(cvar, atoi(COM_Argv(2)));
|
||||
}
|
||||
|
||||
// =========================================================================
|
||||
|
|
Loading…
Reference in a new issue