// Token: 0x06000095 RID: 149 RVA: 0x00006AF4 File Offset: 0x00004CF4
        public static bool GenerateRaycast(out RaycastInfo info)
        {
            ItemGunAsset itemGunAsset = OptimizationVariables.MainPlayer.equipment.asset as ItemGunAsset;
            float        num          = (itemGunAsset != null) ? itemGunAsset.range : 15.5f;

            info = RaycastUtilities.GenerateOriginalRaycast(new Ray(OptimizationVariables.MainPlayer.look.aim.position, OptimizationVariables.MainPlayer.look.aim.forward), num, RayMasks.DAMAGE_CLIENT);
            bool flag = RaycastOptions.EnablePlayerSelection && RaycastUtilities.TargetedPlayer != null;

            if (flag)
            {
                GameObject gameObject = RaycastUtilities.TargetedPlayer.gameObject;
                bool       flag2      = true;
                Vector3    position   = OptimizationVariables.MainPlayer.look.aim.position;
                bool       flag3      = Vector3.Distance(position, gameObject.transform.position) > num;
                if (flag3)
                {
                    flag2 = false;
                }
                Vector3 point;
                bool    flag4 = !SphereUtilities.GetRaycast(gameObject, position, out point);
                if (flag4)
                {
                    flag2 = false;
                }
                bool flag5 = flag2;
                if (flag5)
                {
                    info = RaycastUtilities.GenerateRaycast(gameObject, point, info.collider);
                    return(true);
                }
                bool onlyShootAtSelectedPlayer = RaycastOptions.OnlyShootAtSelectedPlayer;
                if (onlyShootAtSelectedPlayer)
                {
                    return(false);
                }
            }
            GameObject @object;
            Vector3    point2;
            bool       targetObject = RaycastUtilities.GetTargetObject(RaycastUtilities.Objects, out @object, out point2, (double)num);
            bool       result;

            if (targetObject)
            {
                info   = RaycastUtilities.GenerateRaycast(@object, point2, info.collider);
                result = true;
            }
            else
            {
                result = false;
            }
            return(result);
        }
        // Token: 0x06000097 RID: 151 RVA: 0x00006D0C File Offset: 0x00004F0C
        public static bool GetTargetObject(GameObject[] Objects, out GameObject Object, out Vector3 Point, double Range)
        {
            double num  = Range + 1.0;
            double num2 = 180.0;

            Object = null;
            Point  = Vector3.zero;
            Vector3 position = OptimizationVariables.MainPlayer.look.aim.position;
            Vector3 forward  = OptimizationVariables.MainPlayer.look.aim.forward;

            foreach (GameObject gameObject in Objects)
            {
                bool flag = !(gameObject == null);
                if (flag)
                {
                    Vector3 position2 = gameObject.transform.position;
                    Player  component = gameObject.GetComponent <Player>();
                    bool    flag2     = !component || (!component.life.isDead && !FriendUtilities.IsFriendly(component) && (!RaycastOptions.NoShootthroughthewalls || RaycastUtilities.NoShootthroughthewalls(gameObject.transform)));
                    if (flag2)
                    {
                        Zombie component2 = gameObject.GetComponent <Zombie>();
                        bool   flag3      = !component2 || !component2.isDead;
                        if (flag3)
                        {
                            bool flag4 = gameObject.GetComponent <RaycastComponent>() == null;
                            if (flag4)
                            {
                                gameObject.AddComponent <RaycastComponent>();
                            }
                            else
                            {
                                double distance = VectorUtilities.GetDistance(position, position2);
                                bool   flag5    = distance <= Range;
                                if (flag5)
                                {
                                    bool silentAimUseFOV = RaycastOptions.SilentAimUseFOV;
                                    if (silentAimUseFOV)
                                    {
                                        double angleDelta = VectorUtilities.GetAngleDelta(position, forward, position2);
                                        bool   flag6      = angleDelta > (double)RaycastOptions.SilentAimFOV || angleDelta > num2;
                                        if (flag6)
                                        {
                                            goto IL_1A6;
                                        }
                                        num2 = angleDelta;
                                    }
                                    else
                                    {
                                        bool flag7 = distance > num;
                                        if (flag7)
                                        {
                                            goto IL_1A6;
                                        }
                                    }
                                    Vector3 vector;
                                    bool    raycast = SphereUtilities.GetRaycast(gameObject, position, out vector);
                                    if (raycast)
                                    {
                                        Object = gameObject;
                                        num    = distance;
                                        Point  = vector;
                                    }
                                }
                            }
                        }
                    }
                }
                IL_1A6 :;
            }
            return(Object != null);
        }