]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Hide hidden and 'other' weapons from the keybind list
authorMario <mario@smbclan.net>
Sat, 30 Apr 2016 09:58:35 +0000 (19:58 +1000)
committerMario <mario@smbclan.net>
Sat, 30 Apr 2016 09:58:35 +0000 (19:58 +1000)
qcsrc/menu/xonotic/keybinder.qc

index 3cb20d3018dfaa69b20c0ac3867dd62f98d01992..ca2db83573d02a468f7077cb5474f331979fc00d 100644 (file)
@@ -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)