Cvar_VariableValue
============
*/
-float Cvar_VariableValueOr(cvar_state_t *cvars, const char *var_name, double def, int neededflags)
+float Cvar_VariableValueOr(cvar_state_t *cvars, const char *var_name, float def, int neededflags)
{
cvar_t *var;
Cvar_SetValue
============
*/
-void Cvar_SetValueQuick(cvar_t *var, double value)
+void Cvar_SetValueQuick(cvar_t *var, float value)
{
char val[MAX_INPUTLINE];
- if ((double)((int)value) == value)
+ if ((float)((int)value) == value)
dpsnprintf(val, sizeof(val), "%i", (int)value);
else
dpsnprintf(val, sizeof(val), "%f", value);
Cvar_SetQuick(var, val);
}
-void Cvar_SetValue(cvar_state_t *cvars, const char *var_name, double value)
+void Cvar_SetValue(cvar_state_t *cvars, const char *var_name, float value)
{
char val[MAX_INPUTLINE];
- if ((double)((int)value) == value)
+ if ((float)((int)value) == value)
dpsnprintf(val, sizeof(val), "%i", (int)value);
else
dpsnprintf(val, sizeof(val), "%f", value);
const char *string;
const char *description;
int integer;
- double value;
- double vector[3];
+ float value;
+ float vector[3];
const char *defstring;
const char *initstring;
const char *initdescription;
int initinteger;
- double initvalue;
- double initvector[3];
+ float initvalue;
+ float initvector[3];
const char *initdefstring;
int globaldefindex[3];
void Cvar_Set_NoCallback (cvar_t *var, const char *value);
/// expands value to a string and calls Cvar_Set
-void Cvar_SetValue (cvar_state_t *cvars, const char *var_name, double value);
+void Cvar_SetValue (cvar_state_t *cvars, const char *var_name, float value);
void Cvar_SetQuick (cvar_t *var, const char *value);
-void Cvar_SetValueQuick (cvar_t *var, double value);
+void Cvar_SetValueQuick (cvar_t *var, float value);
-float Cvar_VariableValueOr (cvar_state_t *cvars, const char *var_name, double def, int neededflags);
+float Cvar_VariableValueOr (cvar_state_t *cvars, const char *var_name, float def, int neededflags);
// returns def if not defined
float Cvar_VariableValue (cvar_state_t *cvars, const char *var_name, int neededflags);