]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Update spider and wyvern angles when attacking, since the target is updated then...
authorMario <mario.mario@y7mail.com>
Thu, 26 Dec 2019 09:04:10 +0000 (19:04 +1000)
committerMario <mario.mario@y7mail.com>
Thu, 26 Dec 2019 09:04:10 +0000 (19:04 +1000)
qcsrc/common/monsters/monster/spider.qc
qcsrc/common/monsters/monster/wyvern.qc

index b684af15255e66efc70d9580e34f90c3dea825f4..d9a51c05e9a4649718deac200f0e5f4beeff9b6a 100644 (file)
@@ -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);
index d07669af0ea1861edcb230d86cc27cb151b5d8d7..4de122e8494419205178cc87dc74f77957699c7f 100644 (file)
@@ -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;