#include "../cl_client.qh"
#include "../../common/buffs.qh"
+#include "../../common/items/all.qc"
+
void spawnfunc_item_minst_cells (void)
{
if (!g_instagib) { remove(self); return; }
if (!self.ammo_cells)
self.ammo_cells = autocvar_g_instagib_ammo_drop;
- StartItem ("models/items/a_cells.md3",
- "misc/itempickup.wav", 45, 0,
- "Vaporizer Ammo", IT_CELLS, 0, 0, generic_pickupevalfunc, 100);
+ StartItemA (ITEM_VaporizerCells);
}
void instagib_health_mega()
{
self.max_health = 1;
- StartItem ("models/items/g_h100.md3",
- "misc/megahealth.wav", g_pickup_respawntime_powerup, g_pickup_respawntimejitter_powerup,
- "Extralife", IT_NAILS, 0, FL_POWERUP, generic_pickupevalfunc, BOT_PICKUP_RATING_HIGH);
+ StartItemA (ITEM_ExtraLife);
}
.float instagib_nextthink;
MUTATOR_HOOKFUNCTION(instagib_MonsterSpawn)
{
// always refill ammo
- if(self.monsterid == MON_MAGE)
+ if(self.monsterid == MON_MAGE.monsterid)
self.skin = 1;
return false;
frag_mirrordamage = 0;
}
- if((frag_target.buffs & BUFF_INVISIBLE) || (frag_target.items & IT_STRENGTH))
+ if((frag_target.buffs & BUFF_INVISIBLE.m_itemid) || (frag_target.items & IT_STRENGTH))
yoda = 1;
return false;
MUTATOR_HOOKFUNCTION(instagib_OnEntityPreSpawn)
{
if (!autocvar_g_powerups) { return false; }
- if (!(self.classname == "item_strength" || self.classname == "item_invincible" || self.classname == "item_health_mega"))
+ if (!(self.classname == "item_strength" || self.classname == "item_invincible" || self.itemdef == ITEM_HealthMega))
return false;
entity e = spawn();