found I had missed a few places to set int_val during the port to newtree

This commit is contained in:
Bill Currie 2000-09-26 03:16:16 +00:00
parent 8ed4ef45cb
commit 1d91e86b4b

View file

@ -225,6 +225,7 @@ void Cvar_SetROM (cvar_t *var, char *value)
var->string = malloc (strlen(value)+1);
strcpy (var->string, value);
var->value = atof (var->string);
var->int_val = atoi (var->string);
if ((var->flags & CVAR_SERVERINFO) && changed) {
if (sv.active)
@ -470,6 +471,7 @@ cvar_t *Cvar_Get(char *name, char *string, int cvarflags, char *description)
v->flags = cvarflags;
v->description = strdup(description);
v->value = atof (v->string);
v->int_val = atoi (v->string);
return v;
}
// Cvar does exist, so we update the flags and return.