From 0ae5c891a2dbe8e23f0d62b6121bfca904764de5 Mon Sep 17 00:00:00 2001 From: Mario Date: Thu, 20 Oct 2016 06:46:04 +1000 Subject: [PATCH] Clean up monster direction checking code a bit more --- qcsrc/common/monsters/sv_monsters.qc | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/qcsrc/common/monsters/sv_monsters.qc b/qcsrc/common/monsters/sv_monsters.qc index 44ce0245b..fd921a032 100644 --- a/qcsrc/common/monsters/sv_monsters.qc +++ b/qcsrc/common/monsters/sv_monsters.qc @@ -1128,21 +1128,17 @@ void Monster_Move_2D(entity this, float mspeed, bool allow_jumpoff) return; } - bool reverse = false; - vector a, b; - makevectors(this.angles); - a = this.origin + '0 0 16'; - b = this.origin + '0 0 16' + v_forward * 32; + vector a = CENTER_OR_VIEWOFS(this); + vector b = CENTER_OR_VIEWOFS(this) + v_forward * 32; traceline(a, b, MOVE_NORMAL, this); + bool reverse = false; if(trace_fraction != 1.0) reverse = true; - if(trace_ent && IS_PLAYER(trace_ent) && !(trace_ent.items & ITEM_Strength.m_itemid)) reverse = false; - if(trace_ent && IS_MONSTER(trace_ent)) reverse = true; -- 2.39.2