Make sure delayed monster attacks also update angles
authorMario <mario.mario@y7mail.com>
Fri, 15 Nov 2019 12:07:33 +0000 (22:07 +1000)
committerMario <mario.mario@y7mail.com>
Fri, 15 Nov 2019 12:07:40 +0000 (22:07 +1000)
qcsrc/common/monsters/monster/shambler.qc
qcsrc/common/monsters/sv_monsters.qc

index 9390f5d..2e3f02a 100644 (file)
@@ -116,8 +116,6 @@ void M_Shambler_Attack_Lightning_Think(entity this)
 
 void M_Shambler_Attack_Lightning(entity this)
 {
-       monster_makevectors(this, this.enemy);
-
        entity gren = new(grenade);
        gren.owner = gren.realowner = this;
        gren.bot_dodge = true;
index b30bf45..4f2139c 100644 (file)
@@ -189,7 +189,11 @@ void monster_changeteam(entity this, int newteam)
 .void(entity) monster_delayedfunc;
 void Monster_Delay_Action(entity this)
 {
-       if(Monster_ValidTarget(this.owner, this.owner.enemy)) { this.monster_delayedfunc(this.owner); }
+       if(Monster_ValidTarget(this.owner, this.owner.enemy))
+       {
+               monster_makevectors(this.owner, this.owner.enemy);
+               this.monster_delayedfunc(this.owner);
+       }
 
        if(this.cnt > 1)
        {
@@ -359,8 +363,6 @@ bool Monster_Attack_Melee(entity this, entity targ, float damg, vector anim, flo
        else
                this.attack_finished_single[0] = this.anim_finished = time + animtime;
 
-       monster_makevectors(this, targ);
-
        traceline(this.origin + this.view_ofs, this.origin + v_forward * er, 0, this);
 
        if(trace_ent.takedamage)