]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
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 9390f5d23a74dcc0249f4d395caf2119d944ed30..2e3f02a0623a86f5591c5b922e0f8ce13ee27b7d 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 b30bf4583bf35fe5a8e8349971a614e00a7bb493..4f2139cc170a56c78d49548f47b360e8ca8e78b3 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)