return;
memcpy(new_value,value,MAX_INPUTLINE);
-
+
// Call the function stored in the cvar for bounds checking, cleanup, etc
if (var->callback)
var->callback(new_value);
}
}
- if (slowmo.value < 0.00001 && slowmo.value != 0)
- Cvar_SetValueQuick(&slowmo, 0);
if (host_framerate.value < 0.00001 && host_framerate.value != 0)
Cvar_SetValueQuick(&host_framerate, 0);
#undef PRVM_DECLARE_function
};
+static void SV_Slowmo_c(char *string)
+{
+ double value;
+ value = atof(string);
+ if(value < 0.00001 && value != 0)
+ string[0] = '0', string[1] = 0;
+}
//============================================================================
Cvar_RegisterVariable (&samelevel);
Cvar_RegisterVariable (&skill);
Cvar_RegisterVariable (&slowmo);
+ Cvar_RegisterCallback (&slowmo, SV_Slowmo_c);
Cvar_RegisterVariable (&sv_accelerate);
Cvar_RegisterVariable (&sv_aim);
Cvar_RegisterVariable (&sv_airaccel_qw);