]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Make sure button is not disabled before playing the click sound
authorterencehill <piuntn@gmail.com>
Wed, 9 Dec 2015 20:13:10 +0000 (21:13 +0100)
committerterencehill <piuntn@gmail.com>
Wed, 9 Dec 2015 20:13:10 +0000 (21:13 +0100)
qcsrc/menu/item/button.qc

index a9112b88ff0ebd6dd2c730499ef3b90e1d2b1e46..a8c19483b469f3270ff546f02627cc455b79a278 100644 (file)
        {
                if (key == K_ENTER || key == K_SPACE || key == K_KP_ENTER)
                {
-                       me.playClickSound(me);
-                       me.clickTime = 0.1;  // delayed for effect
+                       if(!me.disabled)
+                       {
+                               me.playClickSound(me);
+                               me.clickTime = 0.1;  // delayed for effect
+                       }
                        return 1;
                }
                return 0;