From: Freddy Date: Sat, 5 Nov 2016 01:41:34 +0000 (+0100) Subject: Use .instanceOfPowerup X-Git-Tag: xonotic-v0.8.2~450^2~4 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=2aad40c34f28e4be095211ef3016b90c726fe501;p=xonotic%2Fxonotic-data.pk3dir.git Use .instanceOfPowerup --- diff --git a/qcsrc/common/mutators/mutator/nix/sv_nix.qc b/qcsrc/common/mutators/mutator/nix/sv_nix.qc index ded7f72eb..143b3c6ed 100644 --- a/qcsrc/common/mutators/mutator/nix/sv_nix.qc +++ b/qcsrc/common/mutators/mutator/nix/sv_nix.qc @@ -236,7 +236,7 @@ MUTATOR_HOOKFUNCTION(nix, FilterItem) { return !autocvar_g_nix_with_healtharmor; } - else if(item.itemdef == ITEM_Strength || item.itemdef == ITEM_Shield) + else if(item.itemdef.instanceOfPowerup) { return !autocvar_g_nix_with_powerups; } diff --git a/qcsrc/common/t_items.qc b/qcsrc/common/t_items.qc index 2b9a1f5d9..50a796c81 100644 --- a/qcsrc/common/t_items.qc +++ b/qcsrc/common/t_items.qc @@ -463,7 +463,7 @@ void Item_Show (entity e, float mode) e.ItemStatus &= ~ITS_AVAILABLE; }} - if (def == ITEM_Strength || def == ITEM_Shield) + if (def.instanceOfPowerup) e.ItemStatus |= ITS_POWERUP; if (autocvar_g_nodepthtestitems)