Cvar_VariableValue
============
*/
-float Cvar_VariableValueOr(cvar_state_t *cvars, const char *var_name, float def, int neededflags)
+float Cvar_VariableValueOr(cvar_state_t *cvars, const char *var_name, double def, int neededflags)
{
cvar_t *var;
Cvar_SetValue
============
*/
-void Cvar_SetValueQuick(cvar_t *var, float value)
+void Cvar_SetValueQuick(cvar_t *var, double value)
{
char val[MAX_INPUTLINE];
- if ((float)((int)value) == value)
+ if ((double)((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, float value)
+void Cvar_SetValue(cvar_state_t *cvars, const char *var_name, double value)
{
char val[MAX_INPUTLINE];
- if ((float)((int)value) == value)
+ if ((double)((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;
- float value;
- float vector[3];
+ double value;
+ double vector[3];
const char *defstring;
const char *initstring;
const char *initdescription;
int initinteger;
- float initvalue;
- float initvector[3];
+ double initvalue;
+ double 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, float value);
+void Cvar_SetValue (cvar_state_t *cvars, const char *var_name, double value);
void Cvar_SetQuick (cvar_t *var, const char *value);
-void Cvar_SetValueQuick (cvar_t *var, float value);
+void Cvar_SetValueQuick (cvar_t *var, double value);
-float Cvar_VariableValueOr (cvar_state_t *cvars, const char *var_name, float def, int neededflags);
+float Cvar_VariableValueOr (cvar_state_t *cvars, const char *var_name, double def, int neededflags);
// returns def if not defined
float Cvar_VariableValue (cvar_state_t *cvars, const char *var_name, int neededflags);