X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Fmonsters%2Fmonster%2Fwyvern.qc;h=001b2e24d84a5bf3216d97282f1a241669999c82;hb=b9671f63469586007314131f3f53728795c035cd;hp=87cc5d73f8098fd647a28274a9f822e1c880412a;hpb=daab9330abb8952053b47239d1322cd029b08cd1;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/monsters/monster/wyvern.qc b/qcsrc/common/monsters/monster/wyvern.qc index 87cc5d73f..001b2e24d 100644 --- a/qcsrc/common/monsters/monster/wyvern.qc +++ b/qcsrc/common/monsters/monster/wyvern.qc @@ -45,8 +45,8 @@ float autocvar_g_monster_wyvern_attack_fireball_force; float autocvar_g_monster_wyvern_attack_fireball_radius; float autocvar_g_monster_wyvern_attack_fireball_speed; -void M_Wyvern_Attack_Fireball_Explode(); -void M_Wyvern_Attack_Fireball_Touch(); +void M_Wyvern_Attack_Fireball_Explode(entity this); +void M_Wyvern_Attack_Fireball_Touch(entity this); SOUND(WyvernAttack_FIRE, W_Sound("electro_fire")); METHOD(WyvernAttack, wr_think, void(WyvernAttack thiswep, entity actor, .entity weaponentity, int fire)) @@ -99,14 +99,13 @@ const float wyvern_anim_pain = 3; const float wyvern_anim_death = 4; */ -void M_Wyvern_Attack_Fireball_Explode() +void M_Wyvern_Attack_Fireball_Explode(entity this) { - SELFPARAM(); Send_Effect(EFFECT_FIREBALL_EXPLODE, this.origin, '0 0 0', 1); entity own = this.realowner; - RadiusDamage(this, own, autocvar_g_monster_wyvern_attack_fireball_damage, autocvar_g_monster_wyvern_attack_fireball_edgedamage, autocvar_g_monster_wyvern_attack_fireball_force, world, world, autocvar_g_monster_wyvern_attack_fireball_radius, this.projectiledeathtype, world); + RadiusDamage(this, own, autocvar_g_monster_wyvern_attack_fireball_damage, autocvar_g_monster_wyvern_attack_fireball_edgedamage, autocvar_g_monster_wyvern_attack_fireball_force, NULL, NULL, autocvar_g_monster_wyvern_attack_fireball_radius, this.projectiledeathtype, NULL); FOREACH_ENTITY_FLOAT(takedamage, DAMAGE_AIM, { @@ -117,11 +116,11 @@ void M_Wyvern_Attack_Fireball_Explode() remove(this); } -void M_Wyvern_Attack_Fireball_Touch() +void M_Wyvern_Attack_Fireball_Touch(entity this) { - PROJECTILE_TOUCH; + PROJECTILE_TOUCH(this); - M_Wyvern_Attack_Fireball_Explode(); + M_Wyvern_Attack_Fireball_Explode(this); } bool M_Wyvern_Attack(int attack_type, entity actor, entity targ) @@ -152,12 +151,12 @@ METHOD(Wyvern, mr_think, bool(Wyvern this, entity actor)) return true; } -METHOD(Wyvern, mr_pain, bool(Wyvern this, entity actor)) +METHOD(Wyvern, mr_pain, float(Wyvern this, entity actor, float damage_take, entity attacker, float deathtype)) { TC(Wyvern, this); actor.pain_finished = time + 0.5; setanim(actor, actor.anim_pain1, true, true, false); - return true; + return damage_take; } METHOD(Wyvern, mr_death, bool(Wyvern this, entity actor))