From 598144e07b3ce7ce060e8271f7ddeee20a48cab0 Mon Sep 17 00:00:00 2001 From: Mario Date: Sat, 30 Apr 2016 19:58:35 +1000 Subject: [PATCH] Hide hidden and 'other' weapons from the keybind list --- qcsrc/menu/xonotic/keybinder.qc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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) -- 2.39.2