From b6b3f641c0dd345d179f87a83d134e3c609fd88c Mon Sep 17 00:00:00 2001 From: Mario Date: Thu, 20 Oct 2016 06:35:06 +1000 Subject: [PATCH] Make sure monster turns around if it touches another monster --- qcsrc/common/monsters/sv_monsters.qc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/qcsrc/common/monsters/sv_monsters.qc b/qcsrc/common/monsters/sv_monsters.qc index 3de0ad8d4..0b43ab787 100644 --- a/qcsrc/common/monsters/sv_monsters.qc +++ b/qcsrc/common/monsters/sv_monsters.qc @@ -1128,7 +1128,7 @@ void Monster_Move_2D(entity this, float mspeed, bool allow_jumpoff) return; } - float reverse = false; + bool reverse = false; vector a, b; makevectors(this.angles); @@ -1142,8 +1142,11 @@ void Monster_Move_2D(entity this, float mspeed, bool allow_jumpoff) reverse = true; if(trace_ent) - if(IS_PLAYER(trace_ent) && !(trace_ent.items & IT_STRENGTH)) + if(IS_PLAYER(trace_ent) && !(trace_ent.items & ITEM_Strength.m_itemid)) reverse = false; + + if(trace_ent && IS_MONSTER(trace_ent)) + reverse = true; } // TODO: fix this... tracing is broken if the floor is thin -- 2.39.2