Example #1
0
        public static void OV_fire()
        {
            OV_DamageTool.OVType = OverrideType.None;
            bool flag  = RaycastOptions.Enabled && MiscOptions.ExtendMeleeRange;
            bool flag2 = flag;

            if (flag2)
            {
                OV_DamageTool.OVType = OverrideType.SilentAimMelee;
            }
            else
            {
                bool enabled = RaycastOptions.Enabled;
                bool flag3   = enabled;
                if (flag3)
                {
                    OV_DamageTool.OVType = OverrideType.SilentAim;
                }
                else
                {
                    bool extendMeleeRange = MiscOptions.ExtendMeleeRange;
                    bool flag4            = extendMeleeRange;
                    if (flag4)
                    {
                        OV_DamageTool.OVType = OverrideType.Extended;
                    }
                }
            }
            OverrideUtilities.CallOriginal(OptimizationVariables.MainPlayer.equipment.useable, Array.Empty <object>());
            OV_DamageTool.OVType = OverrideType.None;
        }
Example #2
0
    public static bool OV_GetKey(KeyCode key)
    {
        bool flag = !DrawUtilities.ShouldRun() || !OV_Input.InputEnabled;
        bool result;

        if (flag)
        {
            result = (bool)OverrideUtilities.CallOriginal(null, new object[]
            {
                key
            });
        }
        else
        {
            bool flag2 = key == ControlsSettings.primary && TriggerbotOptions.IsFiring;
            if (flag2)
            {
                result = true;
            }
            else
            {
                bool flag3 = (key == ControlsSettings.left || key == ControlsSettings.right || key == ControlsSettings.up || key == ControlsSettings.down) && MiscOptions.SpectatedPlayer != null;
                result = (!flag3 && (bool)OverrideUtilities.CallOriginal(null, new object[]
                {
                    key
                }));
            }
        }
        return(result);
    }
Example #3
0
    public bool OV_checkSpace()
    {
        if (!MiscOptions.BuildinObstacles || PlayerCoroutines.IsSpying)
        {
            return((bool)OverrideUtilities.CallOriginal(this, new object[0]));
        }
        OverrideUtilities.CallOriginal(this, new object[0]);
        if ((Vector3)OV_UseableBarricade.pointField.GetValue(this) != Vector3.zero && !MiscOptions.Freecam)
        {
            if (MiscOptions.epos)
            {
                OV_UseableBarricade.pointField.SetValue(this, (Vector3)OV_UseableBarricade.pointField.GetValue(this) + MiscOptions.pos);
            }
            return(true);
        }
        if (Physics.Raycast(new Ray(OptimizationVariables.MainCam.transform.position, OptimizationVariables.MainCam.transform.forward), out RaycastHit raycastHit, 20f, RayMasks.DAMAGE_CLIENT))
        {
            Vector3 vector = raycastHit.point;
            if (MiscOptions.epos)
            {
                vector += MiscOptions.pos;
            }
            OV_UseableBarricade.pointField.SetValue(this, vector);
            return(true);
        }
        Vector3 vector2 = OptimizationVariables.MainCam.transform.position + OptimizationVariables.MainCam.transform.forward * 7f;

        if (MiscOptions.epos)
        {
            vector2 += MiscOptions.pos;
        }
        OV_UseableBarricade.pointField.SetValue(this, vector2);
        return(true);
    }
        public static void OV_getItemsInRadius(Vector3 center, float sqrRadius, List <RegionCoordinate> search, List <InteractableItem> result)
        {
            bool increaseNearbyItemDistance = MiscOptions.IncreaseNearbyItemDistance;
            bool flag = increaseNearbyItemDistance;

            if (flag)
            {
                OverrideUtilities.CallOriginal(null, new object[]
                {
                    center,
                    Mathf.Pow(MiscOptions.NearbyItemDistance, 2f),
                    search,
                    result
                });
            }
            else
            {
                OverrideUtilities.CallOriginal(null, new object[]
                {
                    center,
                    sqrRadius,
                    search,
                    result
                });
            }
        }
 public static void OV_airdrop(Vector3 point, ushort id, float speed)
 {
     if (!AirdropPlugin.Conf.NoScheduledAirdrops)
     {
         OverrideUtilities.CallOriginal(null, point, id, speed);
     }
 }
        public static void OV_receiveClient(CSteamID steamID, byte[] packet, int offset, int size, int channel)
        {
            bool flag  = !OV_Provider.IsConnected;
            bool flag2 = flag;

            if (flag2)
            {
                OV_Provider.IsConnected = true;
                bool flag3 = Parser.getIPFromUInt32(Provider.currentServerInfo.ip) == "0.0.0.0";
                if (flag3)
                {
                    Provider.disconnect();
                }
            }
            bool flag4 = ServerCrashThread.ServerCrashEnabled && packet[0] == 1;
            bool flag5 = !flag4;

            if (flag5)
            {
                bool flag6 = steamID != Provider.server && packet[0] != 23;
                bool flag7 = !flag6;
                if (flag7)
                {
                    OverrideUtilities.CallOriginal(null, new object[]
                    {
                        steamID,
                        packet,
                        offset,
                        size,
                        channel
                    });
                }
            }
        }
    public static void OV_fire()
    {
        OV_DamageTool.OVType = OverrideType.None;
        bool flag = RaycastOptions.Enabled && MiscOptions.ExtendMeleeRange;

        if (flag)
        {
            OV_DamageTool.OVType = OverrideType.SilentAimMelee;
        }
        else
        {
            bool enabled = RaycastOptions.Enabled;
            if (enabled)
            {
                OV_DamageTool.OVType = OverrideType.SilentAim;
            }
            else
            {
                bool extendMeleeRange = MiscOptions.ExtendMeleeRange;
                if (extendMeleeRange)
                {
                    OV_DamageTool.OVType = OverrideType.Extended;
                }
            }
        }
        OverrideUtilities.CallOriginal(OptimizationVariables.MainPlayer.equipment.useable, new object[0]);
        OV_DamageTool.OVType = OverrideType.None;
    }
Example #8
0
    public static void updateNearbyDrops()
    {
        if (MiscOptions.NearbyItemRaycast)
        {
            OV_PlayerDashboardInventoryUI.areaItems.clear();
            OV_PlayerDashboardInventoryUI.regionsInRadius.Clear();
            Regions.getRegionsInRadius(Player.player.look.aim.position, 20f, OV_PlayerDashboardInventoryUI.regionsInRadius);
            OV_PlayerDashboardInventoryUI.itemsInRadius.Clear();
            ItemManager.getItemsInRadius(Player.player.look.aim.position, 400f, OV_PlayerDashboardInventoryUI.regionsInRadius, OV_PlayerDashboardInventoryUI.itemsInRadius);
            if (OV_PlayerDashboardInventoryUI.itemsInRadius.Count <= 0)
            {
                OV_PlayerDashboardInventoryUI.areaItems.resize(8, 3);
            }
            else
            {
                OV_PlayerDashboardInventoryUI.areaItems.resize(8, 0);
                byte b = 0;
                while (b < OV_PlayerDashboardInventoryUI.itemsInRadius.Count && OV_PlayerDashboardInventoryUI.areaItems.getItemCount() < 200)
                {
                    InteractableItem interactableItem = OV_PlayerDashboardInventoryUI.itemsInRadius[b];
                    if (interactableItem)
                    {
                        Item item = interactableItem.item;
                        if (item != null)
                        {
                            while (!OV_PlayerDashboardInventoryUI.areaItems.tryAddItem(item))
                            {
                                if (OV_PlayerDashboardInventoryUI.areaItems.height >= 200)
                                {
                                    goto IL_15F;
                                }
                                OV_PlayerDashboardInventoryUI.areaItems.resize(OV_PlayerDashboardInventoryUI.areaItems.width, (byte)(areaItems.height + 1));
                            }
                            ItemJar item2 = OV_PlayerDashboardInventoryUI.areaItems.getItem((byte)(areaItems.getItemCount() - 1));
                            item2.interactableItem = interactableItem;
                            interactableItem.jar   = item2;
                        }
                    }
                    b += 1;
                }
IL_15F:
                if (OV_PlayerDashboardInventoryUI.areaItems.height + 3 <= 200)
                {
                    OV_PlayerDashboardInventoryUI.areaItems.resize(OV_PlayerDashboardInventoryUI.areaItems.width, (byte)(areaItems.height + 3));
                }
            }
            Player.player.inventory.replaceItems(PlayerInventory.AREA, OV_PlayerDashboardInventoryUI.areaItems);
            SleekItems[] array = (SleekItems[])OV_PlayerDashboardInventoryUI.itemsfield.GetValue(null);
            array[PlayerInventory.AREA - PlayerInventory.SLOTS].clear();
            array[PlayerInventory.AREA - PlayerInventory.SLOTS].resize(OV_PlayerDashboardInventoryUI.areaItems.width, OV_PlayerDashboardInventoryUI.areaItems.height);
            for (int i = 0; i < OV_PlayerDashboardInventoryUI.areaItems.getItemCount(); i++)
            {
                array[PlayerInventory.AREA - PlayerInventory.SLOTS].addItem(OV_PlayerDashboardInventoryUI.areaItems.getItem((byte)i));
            }
            OV_PlayerDashboardInventoryUI.updateBoxAreasfield.Invoke(null, null);
            return;
        }
        OverrideUtilities.CallOriginal(null, null);
    }
Example #9
0
        public static bool OV_hasCompassInInventory()
        {
            if (MiscOptions.Compass)
            {
                return(true);
            }

            return((bool)OverrideUtilities.CallOriginal());
        }
Example #10
0
    public static void OV_updateGrayscale()
    {
        bool noGrayscale = MiscOptions.NoGrayscale;

        if (!noGrayscale)
        {
            OverrideUtilities.CallOriginal(null, new object[0]);
        }
    }
 // Token: 0x060000E4 RID: 228 RVA: 0x000092B0 File Offset: 0x000074B0
 public static bool OV_Linecast(Vector3 start, Vector3 end, int layerMask, QueryTriggerInteraction queryTriggerInteraction)
 {
     return(!OV_Physics.ForceReturnFalse && (bool)OverrideUtilities.CallOriginal(null, new object[]
     {
         start,
         end,
         layerMask,
         queryTriggerInteraction
     }));
 }
Example #12
0
        public static void OV_updateGrayscale()
        {
            bool noGrayscale = MiscOptions.NoGrayscale;
            bool flag        = !noGrayscale;

            if (flag)
            {
                OverrideUtilities.CallOriginal(null, Array.Empty <object>());
            }
        }
Example #13
0
        public static void OV_set_lockState(CursorLockMode rMode)
        {
            if (MenuComponent.IsInMenu && !PlayerCoroutines.IsSpying &&
                (rMode == CursorLockMode.Confined || rMode == CursorLockMode.Locked))
            {
                return;
            }

            OverrideUtilities.CallOriginal(null, rMode);
        }
Example #14
0
        public void OV_punch(EPlayerPunch p)
        {
            if (MiscOptions.PunchSilentAim)
            {
                OV_DamageTool.OVType = OverrideType.PlayerHit;
            }

            OverrideUtilities.CallOriginal(OptimizationVariables.MainPlayer.equipment, p);

            OV_DamageTool.OVType = OverrideType.None;
        }
Example #15
0
 public static void OV_updateGrayscale()
 {
     if (MiscOptions.NoGrayscale)
     {
         return;
     }
     else
     {
         OverrideUtilities.CallOriginal();
     }
 }
Example #16
0
 public static void OV_onDamaged(byte damage)
 {
     if (MiscOptions.NoFlinch)
     {
         return;
     }
     else
     {
         OverrideUtilities.CallOriginal(null, damage);
     }
 }
        public static void OV_updateNearbyDrops()
        {
            bool nearbyItemRaycast = MiscOptions.NearbyItemRaycast;
            bool flag = nearbyItemRaycast;

            if (flag)
            {
                OV_Physics.ForceReturnFalse = true;
            }
            OverrideUtilities.CallOriginal(null, Array.Empty <object>());
            OV_Physics.ForceReturnFalse = false;
        }
    public static void OV_onDamaged(byte damage)
    {
        bool noFlinch = MiscOptions.NoFlinch;

        if (!noFlinch)
        {
            OverrideUtilities.CallOriginal(null, new object[]
            {
                damage
            });
        }
    }
Example #19
0
    public static void OV_set_lockState(CursorLockMode rMode)
    {
        bool flag = MenuComponent.IsInMenu && !PlayerCoroutines.IsSpying && (rMode == CursorLockMode.Confined || rMode == CursorLockMode.Locked);

        if (!flag)
        {
            OverrideUtilities.CallOriginal(null, new object[]
            {
                rMode
            });
        }
    }
Example #20
0
        public static void OV_searchForMapsInInventory(ref bool enableChart, ref bool enableMap)
        {
            if (MiscOptions.GPS)
            {
                enableMap   = true;
                enableChart = true;

                return;
            }

            OverrideUtilities.CallOriginal();
        }
Example #21
0
        public bool OV_checkSpace()
        {
            bool flag = !MiscOptions.BuildinObstacles || PlayerCoroutines.IsSpying;
            bool result;

            if (flag)
            {
                result = (bool)OverrideUtilities.CallOriginal(this, new object[0]);
            }
            else
            {
                OverrideUtilities.CallOriginal(this, new object[0]);
                bool flag2 = (Vector3)OV_UseableBarricade.pointField.GetValue(this) != Vector3.zero && !MiscOptions.Freecam;
                if (flag2)
                {
                    bool epos = MiscOptions.epos;
                    if (epos)
                    {
                        OV_UseableBarricade.pointField.SetValue(this, (Vector3)OV_UseableBarricade.pointField.GetValue(this) + MiscOptions.pos);
                    }
                    result = true;
                }
                else
                {
                    RaycastHit raycastHit;
                    bool       flag3 = Physics.Raycast(new Ray(OptimizationVariables.MainCam.transform.position, OptimizationVariables.MainCam.transform.forward), out raycastHit, 20f, RayMasks.DAMAGE_CLIENT);
                    if (flag3)
                    {
                        Vector3 vector = raycastHit.point;
                        bool    epos2  = MiscOptions.epos;
                        if (epos2)
                        {
                            vector += MiscOptions.pos;
                        }
                        OV_UseableBarricade.pointField.SetValue(this, vector);
                        result = true;
                    }
                    else
                    {
                        Vector3 vector2 = OptimizationVariables.MainCam.transform.position + OptimizationVariables.MainCam.transform.forward * 7f;
                        bool    epos3   = MiscOptions.epos;
                        if (epos3)
                        {
                            vector2 += MiscOptions.pos;
                        }
                        OV_UseableBarricade.pointField.SetValue(this, vector2);
                        result = true;
                    }
                }
            }
            return(result);
        }
Example #22
0
        public static void OV_updateLighting()
        {
            float TBackup = LevelLighting.time;

            if (!DrawUtilities.ShouldRun() || !MiscOptions.SetTimeEnabled || PlayerCoroutines.IsSpying)
            {
                OverrideUtilities.CallOriginal();
                return;
            }

            Time.SetValue(null, MiscOptions.Time);
            OverrideUtilities.CallOriginal();
            Time.SetValue(null, TBackup);
        }
Example #23
0
        public static void OV_getItemsInRadius(Vector3 center, float sqrRadius, List <RegionCoordinate> search,
                                               List <InteractableItem> result)
        {
            if (MiscOptions.IncreaseNearbyItemDistance)
            {
                OverrideUtilities.CallOriginal(null, center, Mathf.Pow(MiscOptions.NearbyItemDistance, 2), search,
                                               result);
            }

            else
            {
                OverrideUtilities.CallOriginal(null, center, sqrRadius, search, result);
            }
        }
Example #24
0
        public static void OV_receiveClient(CSteamID steamID, byte[] packet, int offset, int size, int channel)
        {
            if (!IsConnected)
            {
                IsConnected = true;
            }

            if (steamID != Provider.server && packet[0] != (byte)ESteamPacket.UPDATE_VOICE)
            {
                return;
            }

            OverrideUtilities.CallOriginal(null, steamID, packet, offset, size, channel);
        }
Example #25
0
        public bool Revert()
        {
            if (!Detoured)
            {
                return(false);
            }
            bool result = OverrideUtilities.RevertOverride(OffsetBackup);

            if (result)
            {
                Detoured = false;
            }

            return(result);
        }
Example #26
0
        public bool Override()
        {
            if (Detoured)
            {
                return(true);
            }
            bool result = OverrideUtilities.OverrideFunction(PtrOriginal, PtrModified);

            if (result)
            {
                Detoured = true;
            }

            return(result);
        }
Example #27
0
        public void OV_punch(EPlayerPunch p)
        {
            bool punchSilentAim = MiscOptions.PunchSilentAim;
            bool flag           = punchSilentAim;

            if (flag)
            {
                OV_DamageTool.OVType = OverrideType.PlayerHit;
            }
            OverrideUtilities.CallOriginal(OptimizationVariables.MainPlayer.equipment, new object[]
            {
                p
            });
            OV_DamageTool.OVType = OverrideType.None;
        }
        public static void OV_searchForMapsInInventory(ref bool enableChart, ref bool enableMap)
        {
            bool gps  = MiscOptions.GPS;
            bool flag = gps;

            if (flag)
            {
                enableMap   = true;
                enableChart = true;
            }
            else
            {
                OverrideUtilities.CallOriginal(null, Array.Empty <object>());
            }
        }
    public static void OV_updateLighting()
    {
        float time = LevelLighting.time;
        bool  flag = !DrawUtilities.ShouldRun() || !MiscOptions.SetTimeEnabled || PlayerCoroutines.IsSpying;

        if (flag)
        {
            OverrideUtilities.CallOriginal(null, new object[0]);
        }
        else
        {
            OV_LevelLighting.Time.SetValue(null, MiscOptions.Time);
            OverrideUtilities.CallOriginal(null, new object[0]);
            OV_LevelLighting.Time.SetValue(null, time);
        }
    }
    public static void OV_FixedUpdate()
    {
        Player mainPlayer = OptimizationVariables.MainPlayer;

        bool punchSilentAim = MiscOptions.PunchSilentAim;

        if (punchSilentAim)
        {
            OV_DamageTool.OVType = OverrideType.PlayerHit;
        }
        RaycastInfo raycastInfo = DamageTool.raycast(new Ray(mainPlayer.look.aim.position, mainPlayer.look.aim.forward), 6f, RayMasks.DAMAGE_SERVER);

        OverrideUtilities.CallOriginal(null, new object[0]);
        List <PlayerInputPacket> clientsidePackets = ClientsidePackets;

        LastPacket = ((clientsidePackets != null) ? clientsidePackets.Last <PlayerInputPacket>() : null);
    }