From: Mario Date: Fri, 15 Nov 2019 12:07:33 +0000 (+1000) Subject: Make sure delayed monster attacks also update angles X-Git-Tag: xonotic-v0.8.5~1224 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=681845df418cf9870251dbf17a63dd7a5c5f5047;p=xonotic%2Fxonotic-data.pk3dir.git Make sure delayed monster attacks also update angles --- 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)