From: Mario Date: Fri, 23 Mar 2018 16:09:59 +0000 (+1000) Subject: Hide hidden weapons from the weapons panel unless held X-Git-Tag: xonotic-v0.8.5~2220 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=9473568ddb8e9269566eb48dc9b25cba0efd3259;p=xonotic%2Fxonotic-data.pk3dir.git Hide hidden weapons from the weapons panel unless held --- diff --git a/qcsrc/client/hud/panel/weapons.qc b/qcsrc/client/hud/panel/weapons.qc index cebd8f5d6..70c4c1013 100644 --- a/qcsrc/client/hud/panel/weapons.qc +++ b/qcsrc/client/hud/panel/weapons.qc @@ -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; }