Ejemplo n.º 1
0
        /// <summary>
        /// Свечение объекта
        /// </summary>
        /// <param name="SGlowObjectManager"></param>
        /// <param name="Health"></param>
        public void GlowRender(EntityBase *entity, CVisualGlowObjectManager SGlowObjectManager, bool Health = false)
        {
            fixed(void *Class = &this)
            {
                if (!entity->Dormant)
                {
                    if (Health)
                    {
                        Memory.Write((IntPtr)(VClient.GlowObjectManager + (Memory.Read <int>((IntPtr)Class + OffsetDumper.OGlowIndex) * 0x38) + 0x4), 1 - (this.Health / 100f));
                        Memory.Write((IntPtr)(VClient.GlowObjectManager + (Memory.Read <int>((IntPtr)Class + OffsetDumper.OGlowIndex) * 0x38) + 0x8), this.Health / 100f);
                        Memory.Write((IntPtr)(VClient.GlowObjectManager + (Memory.Read <int>((IntPtr)Class + OffsetDumper.OGlowIndex) * 0x38) + 0xC), 0);
                    }
                    else
                    {
                        Memory.Write((IntPtr)(VClient.GlowObjectManager + (Memory.Read <int>((IntPtr)Class + OffsetDumper.OGlowIndex) * 0x38) + 0x4), SGlowObjectManager.Red / 255f);
                        Memory.Write((IntPtr)(VClient.GlowObjectManager + (Memory.Read <int>((IntPtr)Class + OffsetDumper.OGlowIndex) * 0x38) + 0x8), SGlowObjectManager.Green / 255f);
                        Memory.Write((IntPtr)(VClient.GlowObjectManager + (Memory.Read <int>((IntPtr)Class + OffsetDumper.OGlowIndex) * 0x38) + 0xC), SGlowObjectManager.Blue / 255f);
                    }

                    Memory.Write((IntPtr)(VClient.GlowObjectManager + (Memory.Read <int>((IntPtr)Class + OffsetDumper.OGlowIndex) * 0x38) + 0x10), SGlowObjectManager.Allow / 255f);

                    Memory.Write((IntPtr)(VClient.GlowObjectManager + (Memory.Read <int>((IntPtr)Class + OffsetDumper.OGlowIndex) * 0x38) + 0x24), true);
                    Memory.Write((IntPtr)(VClient.GlowObjectManager + (Memory.Read <int>((IntPtr)Class + OffsetDumper.OGlowIndex) * 0x38) + 0x25), false);
                    Memory.Write((IntPtr)(VClient.GlowObjectManager + (Memory.Read <int>((IntPtr)Class + OffsetDumper.OGlowIndex) * 0x38) + 0x26), SGlowObjectManager.FullBloom);
                }
            }
        }
Ejemplo n.º 2
0
        public static void LegitInitialize(EntityBase *EntityBase, TeamID EntityTeam, TeamID PlayerBaseTeam)
        {
            ActiveWeapon = ConfigManager.CAimWeapon[Starting.GetWeaponID(BaseWeapon.ActiveWeaponIndex)];

            if (NativeMethods.GetAsyncKeyState(KeysCode.MS_Click1))
            {
                if (ActiveWeapon.WeaponActive && BaseWeapon.ActiveWeaponClip > 0)
                {
                    if (!IsClosed)
                    {
                        entity   = GetTarget(EntityBase, ActiveWeapon, EntityTeam, PlayerBaseTeam);
                        IsClosed = true;
                    }

                    if (entity != null && entity->Health > 0)
                    {
                        if (ActiveWeapon.SilentActive && BasePlayer.Bullet(false))
                        {
                            SetViewAngelSilent(AngelToTarget(entity, ActiveWeapon.WeaponBone, ActiveWeapon.RcsValue, ActiveWeapon.RcsActive));
                        }
                        else
                        {
                            VEngineClient.ViewAngels = Vector.SmoothAngle(VEngineClient.ViewAngels, AngelToTarget(entity, ActiveWeapon.WeaponBone, ActiveWeapon.RcsValue, ActiveWeapon.RcsActive), ActiveWeapon.Smooth);
                        }
                    }
                    else
                    {
                        IsClosed = false;
                    }

                    if (ActiveWeapon.RcsStandaloneActive && BasePlayer.Bullet(true))
                    {
                        RcsStandalone(ActiveWeapon.RcsStandaloneX, ActiveWeapon.RcsStandaloneY);
                    }
                }

                if (ConfigManager.CAimMisc.MouseAttackActive)
                {
                    VClient.ForceAttack = VClient.SUserCMD.ButtonID.IN_ATTACK;
                }
            }
            else
            {
                OldAngle.X = OldAngle.Y = 0.0f;
                IsClosed   = false;

                VClient.ForceAttack = VClient.SUserCMD.ButtonID.IN_NOATTACK;
            }
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Получение цели
        /// </summary>
        /// <param name="Entity"></param>
        /// <param name="CAimWeapon"></param>
        /// <returns></returns>
        private static EntityBase *GetTarget(EntityBase *Entity, CAimWeapon CAimWeapon, TeamID EntityTeam, TeamID PlayerBaseTeam)
        {
            if ((EntityTeam == PlayerBaseTeam && !ConfigManager.CAimMisc.DangerZoneActive) || (ConfigManager.CAimMisc.PlayerInAirActive && BasePlayer.BhopFlag()) || (ConfigManager.CAimMisc.EnemyInAirActive && Entity->InAir()))
            {
                return(null);
            }
            else if (Vector.GetFov(VEngineClient.ViewAngels, AngelToTarget(Entity, CAimWeapon.WeaponBone, CAimWeapon.RcsValue, CAimWeapon.RcsActive)) <= CAimWeapon.WeaponFov)
            {
                if (ConfigManager.CAimMisc.VisibleID == VisibleID.Spotted && Entity->Spotted == 1)
                {
                    return(Entity);
                }
                else if (ConfigManager.CAimMisc.VisibleID == VisibleID.SpottedByMask && Entity->SpottedByMask > 0)
                {
                    return(Entity);
                }
            }

            return(null);
        }
Ejemplo n.º 4
0
        //public OverlayWindow OverlayWindow;
        //public Graphics Graphics;

        //public static System.Drawing.Rectangle ScreenPrimary = Screen.PrimaryScreen.Bounds;

        //public VisualESP()
        //{
        //    OverlayWindow = new OverlayWindow(ScreenPrimary.Left, ScreenPrimary.Top, ScreenPrimary.Width, ScreenPrimary.Height)
        //    {
        //        IsVisible = true,
        //        IsTopmost = true
        //    };

        //    Graphics = new Graphics()
        //    {
        //        MeasureFPS = true,
        //        Height = OverlayWindow.Height,
        //        PerPrimitiveAntiAliasing = true,
        //        TextAntiAliasing = true,
        //        UseMultiThreadedFactories = true,
        //        VSync = true,
        //        Width = OverlayWindow.Width,
        //        WindowHandle = IntPtr.Zero
        //    };

        //    OverlayWindow.CreateWindow();

        //    Graphics.WindowHandle = OverlayWindow.Handle;
        //    Graphics.Setup();
        //}

        //public SolidBrush GetBrushColor(Color Color) => Graphics.CreateSolidBrush(Color.R, Color.G, Color.B, Color.A);

        public static void VisualInitialize(EntityBase *Entity, TeamID EntityTeam, TeamID PlayerBaseTeam, float[] ViewMatrix = null)
        {
            if (ConfigManager.CVisualGlowObjectManager.GlowActive)
            {
                if ((EntityTeam != PlayerBaseTeam) && !ConfigManager.CVisualMisc.DangerZone)
                {
                    Entity->GlowRender(Entity, ConfigManager.CVisualGlowObjectManager, ConfigManager.CVisualGlowObjectManager.GlowHPActive);
                }
                else if ((EntityTeam == PlayerBaseTeam) && !ConfigManager.CVisualMisc.DangerZone)
                {
                    Entity->GlowRender(Entity, new CVisualGlowObjectManager(), false);
                }
                else if (ConfigManager.CVisualMisc.DangerZone)
                {
                    Entity->GlowRender(Entity, ConfigManager.CVisualGlowObjectManager, ConfigManager.CVisualGlowObjectManager.GlowHPActive);
                }

                BasePlayer.GlowUpdate(ref GlowUpdate);
            }

            if (ConfigManager.CVisualChamsColor.ChamsActive)
            {
                if ((EntityTeam != PlayerBaseTeam) && !ConfigManager.CVisualMisc.DangerZone)
                {
                    Entity->ChamsRender(ConfigManager.CVisualChamsColor, ConfigManager.CVisualChamsColor.ChamsHPActive);
                }
                else if ((EntityTeam == PlayerBaseTeam) && !ConfigManager.CVisualMisc.DangerZone)
                {
                    Entity->ChamsRender(new CVisualChamsColor());
                }
                else if (ConfigManager.CVisualMisc.DangerZone)
                {
                    Entity->ChamsRender(ConfigManager.CVisualChamsColor, ConfigManager.CVisualChamsColor.ChamsHPActive);
                }
            }

            if (ConfigManager.CVisualMisc.RadarActive)
            {
                Entity->Spotted = 1;
            }
        }
Ejemplo n.º 5
0
 /// <summary>
 /// Угол до цели
 /// </summary>
 /// <param name="Player">Индекс игрока</param>
 /// <param name="Bone">Индекс кости</param>
 /// <param name="RcsValue">Значение RCS</param>
 /// <param name="RCS">Контроль спрея</param>
 /// <returns></returns>
 private static Vector3 AngelToTarget(EntityBase *EntityBase, int Bone, float RcsValue, bool RCS) => RCS ? ((BasePlayer.Position + BasePlayer.VecView).CalcAngle(EntityBase->GetBonePosition(Bone)) + (Vector3.Zero - BasePlayer.MyPunch * RcsValue)).NormalizeAngle() : (BasePlayer.Position + BasePlayer.VecView).CalcAngle(EntityBase->GetBonePosition(Bone)).NormalizeAngle();