X-Git-Url: https://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fcommon%2Fmonsters%2Fmonster%2Fwyvern.qc;h=8a4ad160560fa87583ab87a6dd861c7c0f274d54;hp=92a098abf2d0c2040522c88f8b6b8e3e620b1bb1;hb=f785b8a76c2336cb00e78fe9e738d55512a086f5;hpb=9755de88ca66529c0efa49b24c50de94e6a013f5 diff --git a/qcsrc/common/monsters/monster/wyvern.qc b/qcsrc/common/monsters/monster/wyvern.qc index 92a098abf..8a4ad1605 100644 --- a/qcsrc/common/monsters/monster/wyvern.qc +++ b/qcsrc/common/monsters/monster/wyvern.qc @@ -18,7 +18,7 @@ METHOD(WyvernAttack, wr_think, void(WyvernAttack thiswep, entity actor, .entity TC(WyvernAttack, thiswep); if (fire & 1) if (time > actor.attack_finished_single[0] || weapon_prepareattack(thiswep, actor, weaponentity, false, 1.2)) { - if (IS_PLAYER(actor)) W_SetupShot_Dir(actor, weaponentity, v_forward, false, 0, SND_WyvernAttack_FIRE, CH_WEAPON_B, 0); + if (IS_PLAYER(actor)) W_SetupShot_Dir(actor, weaponentity, v_forward, false, 0, SND_WyvernAttack_FIRE, CH_WEAPON_B, 0, DEATH_MONSTER_WYVERN.m_id); if (IS_MONSTER(actor)) { actor.attack_finished_single[0] = time + 1.2; actor.anim_finished = time + 1.2; @@ -71,7 +71,8 @@ void M_Wyvern_Attack_Fireball_Explode(entity this) 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, NULL, NULL, autocvar_g_monster_wyvern_attack_fireball_radius, this.projectiledeathtype, NULL); + 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, DMG_NOWEP, NULL); FOREACH_ENTITY_RADIUS(this.origin, autocvar_g_monster_wyvern_attack_fireball_radius, it.takedamage == DAMAGE_AIM, { @@ -148,25 +149,18 @@ METHOD(Wyvern, mr_anim, bool(Wyvern this, entity actor)) } #endif #ifdef SVQC -spawnfunc(item_cells); METHOD(Wyvern, mr_setup, bool(Wyvern this, entity actor)) { TC(Wyvern, this); - if(!actor.health) actor.health = (autocvar_g_monster_wyvern_health); + if(!GetResource(this, RES_HEALTH)) SetResourceExplicit(actor, RES_HEALTH, autocvar_g_monster_wyvern_health); if(!actor.speed) { actor.speed = (autocvar_g_monster_wyvern_speed_walk); } if(!actor.speed2) { actor.speed2 = (autocvar_g_monster_wyvern_speed_run); } if(!actor.stopspeed) { actor.stopspeed = (autocvar_g_monster_wyvern_speed_stop); } if(!actor.damageforcescale) { actor.damageforcescale = (autocvar_g_monster_wyvern_damageforcescale); } - actor.monster_loot = spawnfunc_item_cells; + actor.monster_loot = ITEM_Cells; actor.monster_attackfunc = M_Wyvern_Attack; return true; } - -METHOD(Wyvern, mr_precache, bool(Wyvern this)) -{ - TC(Wyvern, this); - return true; -} #endif