From: terencehill Date: Wed, 9 Dec 2015 20:13:10 +0000 (+0100) Subject: Make sure button is not disabled before playing the click sound X-Git-Tag: xonotic-v0.8.2~1285^2 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=2b3a986c0cf9289a4552d4ab3f4c5e4514bea067;p=xonotic%2Fxonotic-data.pk3dir.git Make sure button is not disabled before playing the click sound --- diff --git a/qcsrc/menu/item/button.qc b/qcsrc/menu/item/button.qc index a9112b88f..a8c19483b 100644 --- a/qcsrc/menu/item/button.qc +++ b/qcsrc/menu/item/button.qc @@ -54,8 +54,11 @@ { 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;