From: Mario Date: Sat, 30 Apr 2016 09:58:35 +0000 (+1000) Subject: Hide hidden and 'other' weapons from the keybind list X-Git-Tag: xonotic-v0.8.2~937 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=598144e07b3ce7ce060e8271f7ddeee20a48cab0;p=xonotic%2Fxonotic-data.pk3dir.git Hide hidden and 'other' weapons from the keybind list --- diff --git a/qcsrc/menu/xonotic/keybinder.qc b/qcsrc/menu/xonotic/keybinder.qc index 3cb20d301..ca2db8357 100644 --- a/qcsrc/menu/xonotic/keybinder.qc +++ b/qcsrc/menu/xonotic/keybinder.qc @@ -59,9 +59,9 @@ void Xonotic_KeyBinds_Read() for(int imp = 1; imp <= 9; ++imp) { string w_list = ""; - ADD_TO_W_LIST(!(it.flags & WEP_FLAG_MUTATORBLOCKED) && !(it.flags & WEP_FLAG_SUPERWEAPON)); - ADD_TO_W_LIST(it.flags & WEP_FLAG_SUPERWEAPON); - ADD_TO_W_LIST(it.flags & WEP_FLAG_MUTATORBLOCKED); + ADD_TO_W_LIST(!(it.spawnflags & WEP_FLAG_MUTATORBLOCKED) && !(it.spawnflags & WEP_TYPE_OTHER) && !(it.spawnflags & WEP_FLAG_HIDDEN) && !(it.spawnflags & WEP_FLAG_SUPERWEAPON)); + ADD_TO_W_LIST((it.spawnflags & WEP_FLAG_SUPERWEAPON) && !(it.spawnflags & WEP_TYPE_OTHER) && !(it.spawnflags & WEP_FLAG_HIDDEN)); + ADD_TO_W_LIST((it.spawnflags & WEP_FLAG_MUTATORBLOCKED) && !(it.spawnflags & WEP_TYPE_OTHER) && !(it.spawnflags & WEP_FLAG_HIDDEN)); if(w_list) KEYBIND_DEF(strcat("weapon_group_", itos(imp)), substring(w_list, 0, -4)); if(imp == 0)