W_DecreaseAmmo(WEP_CVAR_SEC(vaporizer, ammo));
// ugly instagib hack to reuse the fire mode of the laser
+ int oldwep = self.weapon; // we can't avoid this hack
+ self.weapon = WEP_BLASTER;
W_Blaster_Attack(
- WEP_VAPORIZER | HITTYPE_SECONDARY,
+ WEP_BLASTER | HITTYPE_SECONDARY,
WEP_CVAR_SEC(vaporizer, shotangle),
WEP_CVAR_SEC(vaporizer, damage),
WEP_CVAR_SEC(vaporizer, edgedamage),
WEP_CVAR_SEC(vaporizer, delay),
WEP_CVAR_SEC(vaporizer, lifetime)
);
+ self.weapon = oldwep;
// now do normal refire
weapon_thinkf(WFRAME_FIRE2, WEP_CVAR_SEC(vaporizer, animtime), w_ready);
if(IS_PLAYER(frag_attacker))
if(DEATH_ISWEAPON(frag_deathtype, WEP_VAPORIZER))
+ {
+ if(frag_target.armorvalue)
+ {
+ frag_target.armorvalue -= 1;
+ frag_damage = 0;
+ frag_target.damage_dealt += 1;
+ frag_attacker.damage_dealt += 1; // TODO: change this to a specific hitsound for armor hit
+ Send_Notification(NOTIF_ONE, frag_target, MSG_CENTER, CENTER_INSTAGIB_LIVES_REMAINING, frag_target.armorvalue);
+ }
+ }
+
+ if(IS_PLAYER(frag_attacker) && DEATH_ISWEAPON(frag_deathtype, WEP_BLASTER))
{
if(frag_deathtype & HITTYPE_SECONDARY)
{
frag_force = '0 0 0';
}
}
- else if(frag_target.armorvalue)
- {
- frag_target.armorvalue -= 1;
- frag_damage = 0;
- frag_target.damage_dealt += 1;
- frag_attacker.damage_dealt += 1; // TODO: change this to a specific hitsound for armor hit
- Send_Notification(NOTIF_ONE, frag_target, MSG_CENTER, CENTER_INSTAGIB_LIVES_REMAINING, frag_target.armorvalue);
- }
}
}
frag_mirrordamage = 0;
}
- if(frag_target.items & IT_STRENGTH)
+ if((frag_target.buffs & BUFF_INVISIBLE) || (frag_target.items & IT_STRENGTH))
yoda = 1;
return false;
self.jump_interval = time + WEP_CVAR_PRI(blaster, refire) * W_WeaponRateFactor();
makevectors(self.v_angle);
+ int oldwep = self.weapon;
+ self.weapon = WEP_BLASTER;
W_Blaster_Attack(
WEP_BLASTER | HITTYPE_SECONDARY,
WEP_CVAR_SEC(vaporizer, shotangle),
WEP_CVAR_SEC(vaporizer, delay),
WEP_CVAR_SEC(vaporizer, lifetime)
);
+ self.weapon = oldwep;
}
self.weapon_blocked = false;