void M_Mage_Attack_Spike(vector dir);
void M_Mage_Attack_Push();
-METHOD(MageSpike, wr_think, void(MageSpike thiswep, entity actor, bool fire1, bool fire2)) {
- if (fire1)
+METHOD(MageSpike, wr_think, void(MageSpike thiswep, entity actor, int slot, int fire)) {
+ if (fire & 1)
if (!IS_PLAYER(actor) || weapon_prepareattack(thiswep, actor, false, 0.2)) {
if (!actor.target_range) actor.target_range = autocvar_g_monsters_target_range;
actor.enemy = Monster_FindTarget(actor);
M_Mage_Attack_Spike(w_shotdir);
weapon_thinkf(actor, WFRAME_FIRE1, 0, w_ready);
}
- if (fire2)
+ if (fire & 2)
if (!IS_PLAYER(actor) || weapon_prepareattack(thiswep, actor, true, 0.5)) {
M_Mage_Attack_Push();
weapon_thinkf(actor, WFRAME_FIRE2, 0, w_ready);
self.realowner.mage_spike = world;
Send_Effect(EFFECT_EXPLOSION_SMALL, self.origin, '0 0 0', 1);
- RadiusDamage (self, self.realowner, (autocvar_g_monster_mage_attack_spike_damage), (autocvar_g_monster_mage_attack_spike_damage) * 0.5, (autocvar_g_monster_mage_attack_spike_radius), world, world, 0, DEATH_MONSTER_MAGE, other);
+ RadiusDamage (self, self.realowner, (autocvar_g_monster_mage_attack_spike_damage), (autocvar_g_monster_mage_attack_spike_damage) * 0.5, (autocvar_g_monster_mage_attack_spike_radius), world, world, 0, DEATH_MONSTER_MAGE.m_id, other);
remove (self);
}
void M_Mage_Attack_Push()
{SELFPARAM();
sound(self, CH_SHOTS, SND_TAGEXP1, 1, ATTEN_NORM);
- RadiusDamage (self, self, (autocvar_g_monster_mage_attack_push_damage), (autocvar_g_monster_mage_attack_push_damage), (autocvar_g_monster_mage_attack_push_radius), world, world, (autocvar_g_monster_mage_attack_push_force), DEATH_MONSTER_MAGE, self.enemy);
+ RadiusDamage (self, self, (autocvar_g_monster_mage_attack_push_damage), (autocvar_g_monster_mage_attack_push_damage), (autocvar_g_monster_mage_attack_push_radius), world, world, (autocvar_g_monster_mage_attack_push_force), DEATH_MONSTER_MAGE.m_id, self.enemy);
Send_Effect(EFFECT_TE_EXPLOSION, self.origin, '0 0 0', 1);
setanim(self, self.anim_shoot, true, true, true);
if(random() <= 0.7)
{
Weapon wep = WEP_MAGE_SPIKE;
- wep.wr_think(wep, self, false, true);
+ wep.wr_think(wep, self, 0, 2);
return true;
}
self.attack_finished_single = time + (autocvar_g_monster_mage_attack_spike_delay);
self.anim_finished = time + 1;
Weapon wep = WEP_MAGE_SPIKE;
- wep.wr_think(wep, self, true, false);
+ wep.wr_think(wep, self, 0, 1);
return true;
}
}