diff --git a/src/gs-entbase/shared/NSMonster.h b/src/gs-entbase/shared/NSMonster.h index 56d0c583..611c3cdf 100644 --- a/src/gs-entbase/shared/NSMonster.h +++ b/src/gs-entbase/shared/NSMonster.h @@ -117,7 +117,8 @@ typedef enumflags MSF_PREDISASTER, MSF_FADECORPSE, MSF_MULTIPLAYER, - MSF_FALLING + MSF_FALLING, + MSF_HORDE } monsterFlag_t; /* movement states */ diff --git a/src/gs-entbase/shared/NSMonster.qc b/src/gs-entbase/shared/NSMonster.qc index b9b17ac6..cebeaf76 100644 --- a/src/gs-entbase/shared/NSMonster.qc +++ b/src/gs-entbase/shared/NSMonster.qc @@ -180,6 +180,15 @@ NSMonster::SeeThink(void) m_flSeeTime = time + 0.25f; + /* a horse type monster always knows where the nearest player is */ + if (m_iFlags & MSF_HORDE) { + m_eEnemy = Entity_FindClosest(this, "player"); + + if (m_eEnemy) + NewRoute(m_eEnemy.origin); + return; + } + for (entity w = world; (w = findfloat(w, ::takedamage, DAMAGE_YES));) { /* prevent them from shooting non-sentient stuff */ if (!(w.flags & FL_MONSTER) && !(w.flags & FL_CLIENT))