]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/menu/xonotic/checkbox.qc
Rename a few parameters and locals named x, y, z
[xonotic/xonotic-data.pk3dir.git] / qcsrc / menu / xonotic / checkbox.qc
index 6015e48bad45369c9b350e4eefe38d29202f2e8a..949b01c41da50c353beb177a70991d4683f28741 100644 (file)
@@ -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)