}
void W_Vaporizer_Attack(void)
-{
+{SELFPARAM();
- float flying;
- flying = IsFlying(self); // do this BEFORE to make the trace values from FireRailgunBullet last
+ bool flying = IsFlying(self); // do this BEFORE to make the trace values from FireRailgunBullet last
+ float vaporizer_damage = ((WEP_CVAR_PRI(vaporizer, damage) > 0) ? WEP_CVAR_PRI(vaporizer, damage) : 10000);
- W_SetupShot(self, true, 0, "", CH_WEAPON_A, 10000);
+ W_SetupShot(self, true, 0, "", CH_WEAPON_A, vaporizer_damage);
// handle sound separately so we can change the volume
// added bonus: no longer plays the strength sound (strength gives no bonus to instakill anyway)
sound (self, CH_WEAPON_A, W_Sound("minstanexfire"), VOL_BASE * 0.8, ATTEN_NORM);
return false;
}
+ MUTATOR_HOOKFUNCTION(instagib_PlayerDies)
+ {
+ if(DEATH_ISWEAPON(frag_deathtype, WEP_VAPORIZER.m_id))
+ frag_damage = 1000; // always gib if it was a vaporizer death
+
+ return FALSE;
+ }
+
MUTATOR_HOOKFUNCTION(instagib_ItemTouch)
-{
+{SELFPARAM();
if(self.ammo_cells)
{
// play some cool sounds ;)