X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Fmonsters%2Fmonster%2Fwyvern.qc;h=38df673dd1c161d267a4ceeee9b5c63edbf43ae5;hb=6c3362162e191402de680067e86ced4331550117;hp=48e7ad61dce690da511c00b1cc5191bd3e0f0d2c;hpb=6278d072f01179fe6cbfcc1493e8f2c281887663;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/monsters/monster/wyvern.qc b/qcsrc/common/monsters/monster/wyvern.qc index 48e7ad61d..38df673dd 100644 --- a/qcsrc/common/monsters/monster/wyvern.qc +++ b/qcsrc/common/monsters/monster/wyvern.qc @@ -1,7 +1,5 @@ #include "wyvern.qh" -#ifdef IMPLEMENTATION - #ifdef SVQC float autocvar_g_monster_wyvern_attack_fireball_damage; @@ -36,6 +34,7 @@ METHOD(WyvernAttack, wr_think, void(WyvernAttack thiswep, entity actor, .entity setorigin(missile, actor.origin + actor.view_ofs + v_forward * 14); missile.flags = FL_PROJECTILE; IL_PUSH(g_projectiles, missile); + IL_PUSH(g_bot_dodge, missile); missile.velocity = w_shotdir * (autocvar_g_monster_wyvern_attack_fireball_speed); missile.avelocity = '300 300 300'; missile.nextthink = time + 5; @@ -47,7 +46,7 @@ METHOD(WyvernAttack, wr_think, void(WyvernAttack thiswep, entity actor, .entity } } -METHOD(WyvernAttack, wr_checkammo1, bool(WyvernAttack this, entity actor)) { +METHOD(WyvernAttack, wr_checkammo1, bool(WyvernAttack this, entity actor, .entity weaponentity)) { TC(WyvernAttack, this); return true; } @@ -74,10 +73,9 @@ void M_Wyvern_Attack_Fireball_Explode(entity this) 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, + FOREACH_ENTITY_RADIUS(this.origin, autocvar_g_monster_wyvern_attack_fireball_radius, it.takedamage == DAMAGE_AIM, { - if(vdist(it.origin - this.origin, <=, autocvar_g_monster_wyvern_attack_fireball_radius)) - Fire_AddDamage(it, own, 5 * MONSTER_SKILLMOD(own), autocvar_g_monster_wyvern_attack_fireball_damagetime, this.projectiledeathtype); + Fire_AddDamage(it, own, 5 * MONSTER_SKILLMOD(own), autocvar_g_monster_wyvern_attack_fireball_damagetime, this.projectiledeathtype); }); delete(this); @@ -90,9 +88,8 @@ void M_Wyvern_Attack_Fireball_Touch(entity this, entity toucher) M_Wyvern_Attack_Fireball_Explode(this); } -bool M_Wyvern_Attack(int attack_type, entity actor, entity targ) +bool M_Wyvern_Attack(int attack_type, entity actor, entity targ, .entity weaponentity) { - .entity weaponentity = weaponentities[0]; switch(attack_type) { case MONSTER_ATTACK_MELEE: @@ -108,7 +105,7 @@ bool M_Wyvern_Attack(int attack_type, entity actor, entity targ) return false; } -spawnfunc(monster_wyvern) { Monster_Spawn(this, MON_WYVERN.monsterid); } +spawnfunc(monster_wyvern) { Monster_Spawn(this, true, MON_WYVERN.monsterid); } #endif // SVQC #ifdef SVQC @@ -151,7 +148,6 @@ 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); @@ -161,17 +157,9 @@ METHOD(Wyvern, mr_setup, bool(Wyvern this, entity actor)) 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 - #endif