X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fmenu%2Fxonotic%2Fcheckbox.qc;h=949b01c41da50c353beb177a70991d4683f28741;hb=90da6817bc443ee9402472527e746af2c254926e;hp=6015e48bad45369c9b350e4eefe38d29202f2e8a;hpb=c11d1d2ccaa4167045dc11335047a4dfaa2aca5c;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/menu/xonotic/checkbox.qc b/qcsrc/menu/xonotic/checkbox.qc index 6015e48ba..949b01c41 100644 --- a/qcsrc/menu/xonotic/checkbox.qc +++ b/qcsrc/menu/xonotic/checkbox.qc @@ -2,28 +2,28 @@ 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) { @@ -58,6 +58,8 @@ void XonoticCheckBox_setChecked(entity me, float val) { me.checked = val; me.saveCvars(me); + if(me.linkedCheckBox) + me.linkedCheckBox.loadCvars(me.linkedCheckBox); } } void XonoticCheckBox_loadCvars(entity me)