Support adding to CV_FLOAT cvars with the Add command

This commit is contained in:
James R 2019-07-04 17:48:17 -07:00
parent e276faf819
commit 14be24dfb6

View file

@ -902,6 +902,9 @@ static void COM_Add_f(void)
return;
}
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)));
}