private bool TrySpawnGroup(HumanAIGroup group)
        {
            bool active = group.m_Active;

            if (group.m_Members.Count == 0)
            {
                return(false);
            }
            bool flag;

            if (group.IsPatrol())
            {
                flag = (((HumanAIPatrol)group).GetClosestPathPointInRange(this.m_MinActivationDistance, this.m_MaxActivationDistance) != null);
            }
            else
            {
                float num = 0f;
                flag = (group.GetClosestMember(out num) && num <this.m_MaxActivationDistance && num> this.m_MinActivationDistance);
            }
            if (flag)
            {
                group.Activate();
                return(true);
            }
            return(false);
        }
Beispiel #2
0
        private bool CheckGroup(HumanAIGroup group)
        {
            if (group.m_Active)
            {
                return(false);
            }
            float   num           = 0f;
            HumanAI closestMember = group.GetClosestMember(out num);
            bool    flag          = closestMember && num <this.m_MaxActivationDistance && num> this.m_MinActivationDistance;

            if (flag)
            {
                group.Activate();
                return(true);
            }
            return(false);
        }