]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix Jetpacks and other undefined powerup items spawning in InstaGib
authorMario <mario.mario@y7mail.com>
Thu, 1 Aug 2024 04:32:30 +0000 (04:32 +0000)
committerDr. Jaska <drjaska83@gmail.com>
Thu, 1 Aug 2024 04:32:30 +0000 (04:32 +0000)
qcsrc/common/mutators/mutator/instagib/sv_instagib.qc

index 12d4316f4ea7a8974b0ab0a1ea64e2b0bbc7319b..028dc7e32c6980ec761bd76cf51e658f41230c44 100644 (file)
@@ -326,6 +326,8 @@ MUTATOR_HOOKFUNCTION(mutator_instagib, FilterItem)
                        if(autocvar_g_powerups)
                                instagib_replace_item_with_random_powerup(item);
                        return true;
+               case ITEM_Invisibility: case ITEM_ExtraLife: case ITEM_Speed:
+                       return false;
                case ITEM_Cells:
                        if(autocvar_g_instagib_ammo_convert_cells)
                                instagib_replace_item_with(item, ITEM_VaporizerCells);
@@ -358,9 +360,6 @@ MUTATOR_HOOKFUNCTION(mutator_instagib, FilterItem)
                        return true;
        }
 
-       if(item.itemdef.instanceOfPowerup)
-               return false;
-
        float cells = GetResource(item, RES_CELLS);
        if(cells > autocvar_g_instagib_ammo_drop && item.classname != "item_vaporizer_cells")
                SetResource(item, RES_CELLS, autocvar_g_instagib_ammo_drop);