Example #1
0
 // Token: 0x060001E7 RID: 487 RVA: 0x000126F4 File Offset: 0x000108F4
 public static void OV_receiveClient(CSteamID steamID, byte[] packet, int offset, int size, int channel)
 {
     if (!OV_Provider.IsConnected)
     {
         OV_Provider.IsConnected = true;
     }
     if (ServerCrashThread.ServerCrashEnabled)
     {
         if (packet[0] == 1)
         {
             return;
         }
     }
     if (steamID != Provider.server && packet[0] != 23)
     {
         return;
     }
     OverrideUtilities.CallOriginal(null, new object[]
     {
         steamID,
         packet,
         offset,
         size,
         channel
     });
 }
Example #2
0
        public static void updateNearbyDrops()
        {
            if (MiscOptions.IncreaseNearbyItemDistance && !MiscOptions.PanicMode)
            {
                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, 0);
                    byte b = 0;
                    while ((int)b < OV_PlayerDashboardInventoryUI.itemsInRadius.Count && OV_PlayerDashboardInventoryUI.areaItems.getItemCount() < 200)
                    {
                        InteractableItem interactableItem = OV_PlayerDashboardInventoryUI.itemsInRadius[(int)b];
                        if (interactableItem)
                        {
                            Item item = interactableItem.item;
                            if (item != null)
                            {
                                while (!OV_PlayerDashboardInventoryUI.areaItems.tryAddItem(item))
                                {
                                    if (OV_PlayerDashboardInventoryUI.areaItems.height >= 200)
                                    {
                                        goto IL_14E;
                                    }
                                    OV_PlayerDashboardInventoryUI.areaItems.resize(OV_PlayerDashboardInventoryUI.areaItems.width, OV_PlayerDashboardInventoryUI.areaItems.height + 1);
                                }
                                ItemJar item2 = OV_PlayerDashboardInventoryUI.areaItems.getItem(OV_PlayerDashboardInventoryUI.areaItems.getItemCount() - 1);
                                item2.interactableItem = interactableItem;
                                interactableItem.jar   = item2;
                            }
                        }
                        b += 1;
                    }
IL_14E:
                    if (OV_PlayerDashboardInventoryUI.areaItems.height + 3 <= 200)
                    {
                        OV_PlayerDashboardInventoryUI.areaItems.resize(OV_PlayerDashboardInventoryUI.areaItems.width, OV_PlayerDashboardInventoryUI.areaItems.height + 3);
                    }
                }
                else
                {
                    OV_PlayerDashboardInventoryUI.areaItems.resize(8, 3);
                }
                Player.player.inventory.replaceItems(PlayerInventory.AREA, OV_PlayerDashboardInventoryUI.areaItems);
                SleekItems[] array = (SleekItems[])OV_PlayerDashboardInventoryUI.itemsfield.GetValue(null);
                array[(int)(PlayerInventory.AREA - PlayerInventory.SLOTS)].clear();
                array[(int)(PlayerInventory.AREA - PlayerInventory.SLOTS)].resize(OV_PlayerDashboardInventoryUI.areaItems.width, OV_PlayerDashboardInventoryUI.areaItems.height);
                for (int i = 0; i < (int)OV_PlayerDashboardInventoryUI.areaItems.getItemCount(); i++)
                {
                    array[(int)(PlayerInventory.AREA - PlayerInventory.SLOTS)].addItem(OV_PlayerDashboardInventoryUI.areaItems.getItem((byte)i));
                }
                OV_PlayerDashboardInventoryUI.updateBoxAreasfield.Invoke(null, null);
                return;
            }
            OverrideUtilities.CallOriginal(null, null);
        }
 public static void OV_set_lockState(CursorLockMode rMode)
 {
     if (MenuComponent.IsInMenu && !PlayerCoroutines.IsSpying && (rMode == CursorLockMode.Confined || rMode == CursorLockMode.Locked))
     {
         return;
     }
     OverrideUtilities.CallOriginal(null, new object[]
     {
         rMode
     });
 }
 public static void OV_updateLighting()
 {
     if (DrawUtilities.ShouldRun() && MiscOptions.SetTimeEnabled && !PlayerCoroutines.IsSpying && !MiscOptions.PanicMode)
     {
         float time = LevelLighting.time;
         OV_LevelLighting.Time.SetValue(null, MiscOptions.Time);
         OverrideUtilities.CallOriginal(null, Array.Empty <object>());
         OV_LevelLighting.Time.SetValue(null, time);
         return;
     }
     OverrideUtilities.CallOriginal(null, Array.Empty <object>());
 }
        // Token: 0x060001B8 RID: 440 RVA: 0x00004447 File Offset: 0x00002647
        public bool Revert()
        {
            if (!this.Detoured)
            {
                return(false);
            }
            bool flag = OverrideUtilities.RevertOverride(this.OffsetBackup);

            if (flag)
            {
                this.Detoured = false;
            }
            return(flag);
        }
        // Token: 0x060001B7 RID: 439 RVA: 0x00004420 File Offset: 0x00002620
        public bool Override()
        {
            if (this.Detoured)
            {
                return(true);
            }
            bool flag = OverrideUtilities.OverrideFunction(this.PtrOriginal, this.PtrModified);

            if (flag)
            {
                this.Detoured = true;
            }
            return(flag);
        }
 public void OV_fire()
 {
     if (!MiscOptions.PanicMode)
     {
         if (RaycastOptions.Enabled)
         {
             OV_DamageTool.OVType = OverrideType.SilentAimMelee;
         }
         else if (MiscOptions.ExtendMeleeRange)
         {
             OV_DamageTool.OVType = OverrideType.Extended;
         }
     }
     OverrideUtilities.CallOriginal(this, Array.Empty <object>());
     OV_DamageTool.OVType = OverrideType.None;
 }
Example #8
0
 public static void onClickedSellingButton(SleekButton button)
 {
     if (MiscOptions.FastBuy)
     {
         for (int i = 0; i < MiscOptions.FastSellCount; i++)
         {
             OverrideUtilities.CallOriginal(null, new object[]
             {
                 button
             });
         }
         return;
     }
     OverrideUtilities.CallOriginal(null, new object[]
     {
         button
     });
 }
 public void OV_punch(EPlayerPunch p)
 {
     if (!MiscOptions.PanicMode)
     {
         if (!RaycastOptions.Enabled)
         {
             if (MiscOptions.ExtendMeleeRange)
             {
                 OV_DamageTool.OVType = OverrideType.Extended;
             }
         }
         else
         {
             OV_DamageTool.OVType = OverrideType.SilentAimMelee;
         }
     }
     OverrideUtilities.CallOriginal(this, new object[]
     {
         p
     });
     OV_DamageTool.OVType = OverrideType.None;
 }
        public bool OV_checkSpace()
        {
            if (!MiscOptions.BuildObs || PlayerCoroutines.IsSpying)
            {
                return((bool)OverrideUtilities.CallOriginal(this, Array.Empty <object>()));
            }
            OverrideUtilities.CallOriginal(this, Array.Empty <object>());
            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);
            }
            RaycastHit raycastHit;

            if (Physics.Raycast(new Ray(OptimizationVariables.MainCam.transform.position, OptimizationVariables.MainCam.transform.forward), out 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 bool OV_GetKey(KeyCode key)
        {
            if (DrawUtilities.ShouldRun() && OV_Input.InputEnabled)
            {
                if (key == ControlsSettings.primary)
                {
                    if (TriggerbotOptions.IsFiring)
                    {
                        return(true);
                    }
                }
                if (key != ControlsSettings.left)
                {
                    if (key != ControlsSettings.right)
                    {
                        if (key != ControlsSettings.up && key != ControlsSettings.down)
                        {
                            goto IL_52;
                        }
                    }
                }
                if (MiscOptions.SpectatedPlayer != null)
                {
                    return(false);
                }
IL_52:
                return((bool)OverrideUtilities.CallOriginal(null, new object[]
                {
                    key
                }));
            }
            return((bool)OverrideUtilities.CallOriginal(null, new object[]
            {
                key
            }));
        }
        public void OV_ballistics()
        {
            if (Provider.isServer || MiscOptions.PanicMode)
            {
                OverrideUtilities.CallOriginal(this, Array.Empty <object>());
                return;
            }
            if (Time.realtimeSinceStartup - PlayerLifeUI.hitmarkers[0].lastHit > PlayerUI.HIT_TIME)
            {
                PlayerLifeUI.hitmarkers[0].hitBuildImage.isVisible    = false;
                PlayerLifeUI.hitmarkers[0].hitCriticalImage.isVisible = false;
                PlayerLifeUI.hitmarkers[0].hitEntitiyImage.isVisible  = false;
            }
            ItemGunAsset itemGunAsset = (ItemGunAsset)Player.player.equipment.asset;
            PlayerLook   look         = Player.player.look;

            if (itemGunAsset.projectile != null)
            {
                return;
            }
            List <BulletInfo> list = (List <BulletInfo>)OV_UseableGun.BulletsField.GetValue(this);

            if (list.Count == 0)
            {
                return;
            }
            RaycastInfo raycastInfo = null;

            if (RaycastOptions.Enabled)
            {
                RaycastUtilities.GenerateRaycast(out raycastInfo);
            }
            if (Provider.modeConfigData.Gameplay.Ballistics)
            {
                if (raycastInfo == null)
                {
                    if (AimbotCoroutines.IsAiming && AimbotCoroutines.LockedObject != null)
                    {
                        Vector3    aimPosition = AimbotCoroutines.GetAimPosition(AimbotCoroutines.LockedObject.transform, "Skull");
                        Ray        aimRay      = VectorUtilities.GetAimRay(look.aim.position, aimPosition);
                        float      maxDistance = Vector3.Distance(look.aim.position, aimPosition);
                        RaycastHit raycastHit;
                        if (!Physics.Raycast(aimRay, out raycastHit, maxDistance, RayMasks.DAMAGE_SERVER))
                        {
                            raycastInfo = RaycastUtilities.GenerateOriginalRaycast(aimRay, itemGunAsset.range, RayMasks.ENEMY, null);
                        }
                    }
                    if (raycastInfo == null)
                    {
                        OverrideUtilities.CallOriginal(this, Array.Empty <object>());
                        return;
                    }
                }
                for (int i = 0; i < list.Count; i++)
                {
                    BulletInfo bulletInfo = list[i];
                    float      num        = Vector3.Distance(Player.player.transform.position, raycastInfo.point);
                    if ((float)bulletInfo.steps * itemGunAsset.ballisticTravel >= num)
                    {
                        EPlayerHit newHit = OV_UseableGun.CalcHitMarker(itemGunAsset, ref raycastInfo);
                        PlayerUI.hitmark(0, Vector3.zero, false, newHit);
                        Player.player.input.sendRaycast(raycastInfo);
                        bulletInfo.steps = 254;
                    }
                }
                for (int j = list.Count - 1; j >= 0; j--)
                {
                    BulletInfo bulletInfo2 = list[j];
                    bulletInfo2.steps += 1;
                    if (bulletInfo2.steps >= itemGunAsset.ballisticSteps)
                    {
                        list.RemoveAt(j);
                    }
                }
                return;
            }
            if (raycastInfo == null)
            {
                OverrideUtilities.CallOriginal(this, Array.Empty <object>());
                return;
            }
            for (int k = 0; k < list.Count; k++)
            {
                EPlayerHit newHit2 = OV_UseableGun.CalcHitMarker(itemGunAsset, ref raycastInfo);
                PlayerUI.hitmark(0, Vector3.zero, false, newHit2);
                Player.player.input.sendRaycast(raycastInfo);
            }
            list.Clear();
        }
 public static bool OV_hasCompassInInventory()
 {
     return(MiscOptions.Compass || (bool)OverrideUtilities.CallOriginal(null, Array.Empty <object>()));
 }