From: Mario Date: Wed, 19 Oct 2016 20:35:06 +0000 (+1000) Subject: Make sure monster turns around if it touches another monster X-Git-Tag: xonotic-v0.8.2~498 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=b6b3f641c0dd345d179f87a83d134e3c609fd88c;p=xonotic%2Fxonotic-data.pk3dir.git Make sure monster turns around if it touches another monster --- 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