entity makeXonoticCheckBox_T(float isInverted, string theCvar, string theText, string theTooltip)
{
- float y, n;
+ float m, n;
if(isInverted > 1)
{
n = isInverted - 1;
- y = -n;
+ m = -n;
}
else if(isInverted < -1)
{
n = isInverted + 1;
- y = -n;
+ m = -n;
}
else if(isInverted == 1)
{
n = 1;
- y = 0;
+ m = 0;
}
else
{
n = 0;
- y = 1;
+ m = 1;
}
- return makeXonoticCheckBoxEx_T(y, n, theCvar, theText, theTooltip);
+ return makeXonoticCheckBoxEx_T(m, n, theCvar, theText, theTooltip);
}
entity makeXonoticCheckBox(float isInverted, string theCvar, string theText)
{
{
me.checked = val;
me.saveCvars(me);
+ if(me.linkedCheckBox)
+ me.linkedCheckBox.loadCvars(me.linkedCheckBox);
}
}
void XonoticCheckBox_loadCvars(entity me)
return;
if(me.checked)
- cvar_set(me.cvarName, ftos(me.yesValue));
+ cvar_set(me.cvarName, ftos_mindecimals(me.yesValue));
else
- cvar_set(me.cvarName, ftos(me.noValue));
+ cvar_set(me.cvarName, ftos_mindecimals(me.noValue));
CheckSendCvars(me, me.cvarName);
}