mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-12-26 12:21:19 +00:00
Support adding to CV_FLOAT cvars with the Add command
This commit is contained in:
parent
e276faf819
commit
14be24dfb6
1 changed files with 4 additions and 1 deletions
|
@ -902,7 +902,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