public static void NavigateToPatrolLoc(NPCHumanContext c)
        {
            if (Object.op_Equality((Object)c.AiLocationManager, (Object)null) || !IsHumanRoamReady.Evaluate(c) || !c.AIAgent.IsNavRunning())
            {
                return;
            }
            PathInterestNode patrolPointInRange = c.AiLocationManager.GetRandomPatrolPointInRange(c.Position, c.AIAgent.GetStats.MinRoamRange, c.AIAgent.GetStats.MaxRoamRange, c.CurrentPatrolPoint);

            if (Object.op_Inequality((Object)patrolPointInRange, (Object)null))
            {
                Vector3 position = ((Component)patrolPointInRange).get_transform().get_position();
                if ((double)((Vector3) ref position).get_sqrMagnitude() > 0.0)
                {
                    HumanNavigateToOperator.MakeUnstuck(c);
                    c.Human.Destination = ((Component)patrolPointInRange).get_transform().get_position();
                    c.Human.SetTargetPathStatus(0.05f);
                    c.CurrentPatrolPoint = patrolPointInRange;
                }
            }
            HumanNavigateToOperator.UpdateRoamTime(c);
            if (c.Human.OnChatter == null)
            {
                return;
            }
            c.Human.OnChatter();
        }
 public static void NavigateToSpawnLoc(NPCHumanContext c)
 {
     if (IsHumanRoamReady.Evaluate(c) && c.AIAgent.IsNavRunning() && c.Human.SpawnPosition.sqrMagnitude > 0f)
     {
         HumanNavigateToOperator.MakeUnstuck(c);
         c.Human.StoppingDistance = 0.1f;
         c.Human.Destination      = c.Human.SpawnPosition;
         c.Human.SetTargetPathStatus(0.05f);
         HumanNavigateToOperator.UpdateRoamTime(c);
     }
 }
 public static void NavigateToRandomLoc(NPCHumanContext c)
 {
     if (IsHumanRoamReady.Evaluate(c) && c.AIAgent.IsNavRunning() && HumanNavigateToOperator.NavigateInDirOfBestSample(c, NavPointSampler.SampleCount.Eight, 4f, NavPointSampler.SampleFeatures.DiscourageSharpTurns, c.AIAgent.GetStats.MinRoamRange, c.AIAgent.GetStats.MaxRoamRange))
     {
         HumanNavigateToOperator.UpdateRoamTime(c);
         if (c.Human.OnChatter != null)
         {
             c.Human.OnChatter();
         }
     }
 }
        public override float GetScore(BaseContext c)
        {
            object obj;

            if (IsHumanRoamReady.Evaluate(c as NPCHumanContext))
            {
                obj = 1;
            }
            else
            {
                obj = null;
            }
            return((float)obj);
        }
        public static void NavigateToSpawnLoc(NPCHumanContext c)
        {
            if (!IsHumanRoamReady.Evaluate(c) || !c.AIAgent.IsNavRunning())
            {
                return;
            }
            Vector3 spawnPosition = c.Human.SpawnPosition;

            if ((double)((Vector3) ref spawnPosition).get_sqrMagnitude() <= 0.0)
            {
                return;
            }
            HumanNavigateToOperator.MakeUnstuck(c);
            c.Human.StoppingDistance = 0.1f;
            c.Human.Destination      = c.Human.SpawnPosition;
            c.Human.SetTargetPathStatus(0.05f);
            HumanNavigateToOperator.UpdateRoamTime(c);
        }
 public static void NavigateToPatrolLoc(NPCHumanContext c)
 {
     if (c.AiLocationManager == null)
     {
         return;
     }
     if (IsHumanRoamReady.Evaluate(c) && c.AIAgent.IsNavRunning())
     {
         PathInterestNode randomPatrolPointInRange = c.AiLocationManager.GetRandomPatrolPointInRange(c.Position, c.AIAgent.GetStats.MinRoamRange, c.AIAgent.GetStats.MaxRoamRange, c.CurrentPatrolPoint);
         if (randomPatrolPointInRange != null && randomPatrolPointInRange.transform.position.sqrMagnitude > 0f)
         {
             HumanNavigateToOperator.MakeUnstuck(c);
             c.Human.Destination = randomPatrolPointInRange.transform.position;
             c.Human.SetTargetPathStatus(0.05f);
             c.CurrentPatrolPoint = randomPatrolPointInRange;
         }
         HumanNavigateToOperator.UpdateRoamTime(c);
         if (c.Human.OnChatter != null)
         {
             c.Human.OnChatter();
         }
     }
 }