From 78ce25de6211e68b44699478ff620b6686a65a1a Mon Sep 17 00:00:00 2001 From: Mario Date: Thu, 26 Dec 2019 19:04:10 +1000 Subject: [PATCH] Update spider and wyvern angles when attacking, since the target is updated then in some cases --- qcsrc/common/monsters/monster/spider.qc | 1 + qcsrc/common/monsters/monster/wyvern.qc | 1 + 2 files changed, 2 insertions(+) diff --git a/qcsrc/common/monsters/monster/spider.qc b/qcsrc/common/monsters/monster/spider.qc index b684af1525..d9a51c05e9 100644 --- a/qcsrc/common/monsters/monster/spider.qc +++ b/qcsrc/common/monsters/monster/spider.qc @@ -66,6 +66,7 @@ METHOD(SpiderAttack, wr_think, void(SpiderAttack thiswep, entity actor, .entity actor.anim_finished = time + 1; } if (isPlayer) actor.enemy = Monster_FindTarget(actor); + monster_makevectors(actor, actor.enemy); W_SetupShot_Dir(actor, weaponentity, v_forward, false, 0, SND_SpiderAttack_FIRE, CH_WEAPON_B, 0, DEATH_MONSTER_SPIDER.m_id); if (!isPlayer) w_shotdir = normalize((actor.enemy.origin + '0 0 10') - actor.origin); M_Spider_Attack_Web(actor); diff --git a/qcsrc/common/monsters/monster/wyvern.qc b/qcsrc/common/monsters/monster/wyvern.qc index d07669af0e..4de122e849 100644 --- a/qcsrc/common/monsters/monster/wyvern.qc +++ b/qcsrc/common/monsters/monster/wyvern.qc @@ -18,6 +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)) { + monster_makevectors(actor, actor.enemy); 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; -- 2.39.2