]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Use .instanceOfPowerup
authorFreddy <schro.sb@gmail.com>
Sat, 5 Nov 2016 01:41:34 +0000 (02:41 +0100)
committerFreddy <schro.sb@gmail.com>
Sat, 5 Nov 2016 01:41:34 +0000 (02:41 +0100)
qcsrc/common/mutators/mutator/nix/sv_nix.qc
qcsrc/common/t_items.qc

index ded7f72eb1ec0f443fc2203ab923434cb72caab2..143b3c6edf63200089fd825c41508f636a18905a 100644 (file)
@@ -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;
        }
index 2b9a1f5d9860c9151cf1f4c3fa8ed947b919a88f..50a796c8100e1b084f6dabcd83e44d5428d62235 100644 (file)
@@ -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)