X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fcommon%2Fturrets%2Fturret%2Fhk_weapon.qc;h=deb508bca297868af8455112045ee3fb9fd47aa3;hp=5a2f05a4832219fdc3ed9c51a3238c79de625f49;hb=45d8904a100765555e622598a39967963733df1d;hpb=fca1fc158c44eff425d73fa279900144249aca16 diff --git a/qcsrc/common/turrets/turret/hk_weapon.qc b/qcsrc/common/turrets/turret/hk_weapon.qc index 5a2f05a48..deb508bca 100644 --- a/qcsrc/common/turrets/turret/hk_weapon.qc +++ b/qcsrc/common/turrets/turret/hk_weapon.qc @@ -1,7 +1,5 @@ #include "hk_weapon.qh" -#ifdef IMPLEMENTATION - #ifdef SVQC float autocvar_g_turrets_unit_hk_shot_speed; @@ -20,7 +18,7 @@ METHOD(HunterKillerAttack, wr_think, void(entity thiswep, entity actor, .entity if (!isPlayer || weapon_prepareattack(thiswep, actor, weaponentity, false, WEP_CVAR_PRI(electro, refire))) { if (isPlayer) { turret_initparams(actor); - W_SetupShot_Dir(actor, weaponentity, v_forward, false, 0, SND_HunterKillerAttack_FIRE, CH_WEAPON_B, 0); + W_SetupShot_Dir(actor, weaponentity, v_forward, false, 0, SND_HunterKillerAttack_FIRE, CH_WEAPON_B, 0, DEATH_TURRET_HK.m_id); actor.tur_shotdir_updated = w_shotdir; actor.tur_shotorg = w_shotorg; actor.tur_head = actor; @@ -60,7 +58,7 @@ void turret_hk_missile_think(entity this) //if (this.cnt < time) // turret_hk_missile_explode(); - if (IS_DEAD(this.enemy)) + if (IS_DEAD(this.enemy) || IS_SPEC(this.enemy) || IS_OBSERVER(this.enemy)) this.enemy = NULL; // Pick the closest valid target. @@ -253,7 +251,7 @@ bool hk_is_valid_target(entity this, entity proj, entity targ) return false; // Cant touch this - if ((targ.takedamage == DAMAGE_NO) || (targ.health < 0)) + if ((targ.takedamage == DAMAGE_NO) || (GetResource(targ, RES_HEALTH) < 0)) return false; // player @@ -278,5 +276,3 @@ bool hk_is_valid_target(entity this, entity proj, entity targ) } #endif - -#endif