]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/mutators/mutator/instagib/instagib.qc
Mutators: add hooks for overkill
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / mutators / mutator / instagib / instagib.qc
index 9d5caef000380495b5b24ce91db02d07ed316db9..16b5b86d1a565ba14a10f5fc950b76d7093b9159 100644 (file)
@@ -8,6 +8,10 @@
 #ifdef IMPLEMENTATION
 #ifdef SVQC
 
+int autocvar_g_instagib_ammo_drop;
+int autocvar_g_instagib_extralives;
+float autocvar_g_instagib_speed_highspeed;
+
 #include "../../../../server/cl_client.qh"
 #include "../../../buffs/all.qh"
 
@@ -19,25 +23,25 @@ spawnfunc(item_minst_cells)
 {
        if (!g_instagib) { remove(self); return; }
        if (!self.ammo_cells) self.ammo_cells = autocvar_g_instagib_ammo_drop;
-       StartItemA(ITEM_VaporizerCells);
+       StartItem(this, ITEM_VaporizerCells);
 }
 
 void instagib_invisibility()
 {SELFPARAM();
        self.strength_finished = autocvar_g_balance_powerup_strength_time;
-       StartItemA(ITEM_Invisibility);
+       StartItem(this, ITEM_Invisibility);
 }
 
 void instagib_extralife()
 {SELFPARAM();
        self.max_health = 1;
-       StartItemA(ITEM_ExtraLife);
+       StartItem(this, ITEM_ExtraLife);
 }
 
 void instagib_speed()
 {SELFPARAM();
        self.invincible_finished = autocvar_g_balance_powerup_invincible_time;
-       StartItemA(ITEM_Speed);
+       StartItem(this, ITEM_Speed);
 }
 
 .float instagib_nextthink;
@@ -367,6 +371,7 @@ MUTATOR_HOOKFUNCTION(mutator_instagib, FilterItem)
                e.noalign = self.noalign;
         e.cnt = self.cnt;
         e.team = self.team;
+        e.spawnfunc_checked = true;
                WITH(entity, self, e, spawnfunc_item_minst_cells(e));
                return true;
        }