#endif
}
-#include "../../weapons/all.qh"
+#include <common/weapons/all.qh>
CLASS(WyvernAttack, PortoLaunch)
/* flags */ ATTRIB(WyvernAttack, spawnflags, int, WEP_TYPE_OTHER | WEP_FLAG_HIDDEN | WEP_FLAG_MUTATORBLOCKED);
void M_Wyvern_Attack_Fireball_Explode();
void M_Wyvern_Attack_Fireball_Touch();
-METHOD(WyvernAttack, wr_think, void(WyvernAttack thiswep, entity actor, int slot, int fire)) {
+SOUND(WyvernAttack_FIRE, W_Sound("electro_fire"));
+METHOD(WyvernAttack, wr_think, void(WyvernAttack thiswep, entity actor, .entity weaponentity, int fire)) {
if (fire & 1)
- if (time > actor.attack_finished_single[0] || weapon_prepareattack(thiswep, actor, slot, false, 1.2)) {
- if (IS_PLAYER(actor)) W_SetupShot_Dir(actor, v_forward, false, 0, W_Sound("electro_fire"), CH_WEAPON_B, 0);
+ if (time > actor.attack_finished_single[0] || weapon_prepareattack(thiswep, actor, weaponentity, false, 1.2)) {
+ if (IS_PLAYER(actor)) W_SetupShot_Dir(actor, v_forward, false, 0, SND(WyvernAttack_FIRE), CH_WEAPON_B, 0);
if (IS_MONSTER(actor)) {
actor.attack_finished_single[0] = time + 1.2;
actor.anim_finished = time + 1.2;
missile.touch = M_Wyvern_Attack_Fireball_Touch;
CSQCProjectile(missile, true, PROJECTILE_FIREMINE, true);
- weapon_thinkf(actor, slot, WFRAME_FIRE1, 0, w_ready);
+ weapon_thinkf(actor, weaponentity, WFRAME_FIRE1, 0, w_ready);
}
}
float M_Wyvern_Attack(float attack_type, entity targ)
{
SELFPARAM();
+ .entity weaponentity = weaponentities[0];
switch(attack_type)
{
case MONSTER_ATTACK_MELEE:
{
w_shotdir = normalize((self.enemy.origin + '0 0 10') - self.origin);
Weapon wep = WEP_WYVERN_ATTACK;
- wep.wr_think(wep, self, 0, 1);
+ wep.wr_think(wep, self, weaponentity, 1);
return true;
}
}