mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2025-01-27 11:40:52 +00:00
Merge branch 'add-floats-command' into 'master'
Fix the Add command when floats See merge request KartKrew/Kart-Public!153
This commit is contained in:
commit
cab34bee6f
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