]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Hide hidden weapons from the weapons panel unless held
authorMario <mario@smbclan.net>
Fri, 23 Mar 2018 16:09:59 +0000 (02:09 +1000)
committerMario <mario@smbclan.net>
Fri, 23 Mar 2018 16:09:59 +0000 (02:09 +1000)
qcsrc/client/hud/panel/weapons.qc

index cebd8f5d65c162b6e3d15d90a5e7a496bbbc0858..70c4c10131303153faad8ec0fc2bfacb0474265b 100644 (file)
@@ -30,7 +30,7 @@ int weaponorder_cmp(int i, int j, entity pass)
        int nHidden = 0; \
        FOREACH(Weapons, it != WEP_Null, { \
                if (weapons_stat & WepSet_FromWeapon(it)) continue; \
-               if (it.spawnflags & WEP_FLAG_HIDDEN || it.spawnflags & WEP_FLAG_MUTATORBLOCKED) nHidden += 1; \
+               if ((it.spawnflags & WEP_FLAG_HIDDEN) || (it.spawnflags & WEP_FLAG_MUTATORBLOCKED)) nHidden += 1; \
        }); \
        vector table_size = HUD_GetTableSize_BestItemAR((Weapons_COUNT - 1) - nHidden, panel_size, aspect); \
        columns = table_size.x; \
@@ -407,7 +407,7 @@ void HUD_Weapons()
                }
                else
                {
-                       if (it.spawnflags & WEP_FLAG_MUTATORBLOCKED && !(weapons_stat & WepSet_FromWeapon(it)))
+                       if (((it.spawnflags & WEP_FLAG_HIDDEN) || (it.spawnflags & WEP_FLAG_MUTATORBLOCKED)) && !(weapons_stat & WepSet_FromWeapon(it)))
                                continue;
                }