From 681845df418cf9870251dbf17a63dd7a5c5f5047 Mon Sep 17 00:00:00 2001 From: Mario Date: Fri, 15 Nov 2019 22:07:33 +1000 Subject: [PATCH] Make sure delayed monster attacks also update angles --- qcsrc/common/monsters/monster/shambler.qc | 2 -- qcsrc/common/monsters/sv_monsters.qc | 8 +++++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/qcsrc/common/monsters/monster/shambler.qc b/qcsrc/common/monsters/monster/shambler.qc index 9390f5d23..2e3f02a06 100644 --- a/qcsrc/common/monsters/monster/shambler.qc +++ b/qcsrc/common/monsters/monster/shambler.qc @@ -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; diff --git a/qcsrc/common/monsters/sv_monsters.qc b/qcsrc/common/monsters/sv_monsters.qc index b30bf4583..4f2139cc1 100644 --- a/qcsrc/common/monsters/sv_monsters.qc +++ b/qcsrc/common/monsters/sv_monsters.qc @@ -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) -- 2.39.2