示例#1
0
        public static void Start(RenderTarget Device)
        {
            spectatorString = "Spectators:\n";
            visuals         = Settings.userSettings.VisualSettings;
            visColors       = Settings.userSettings.VisualColors;

            EntityList.List     = Entity.EntityArray;
            EntityList.ItemList = ItemObjects.ItemList;

            if (!visuals.Enabled)
            {
                if (!Settings.userSettings.MiscSettings.C4Countdown)
                {
                    if (!Settings.userSettings.MiscSettings.Spectators)
                    {
                        return;
                    }
                }
            }
            matrix = Memory.Read <Matrix4x4>(Memory.client + Offsets.dwViewMatrix);

            Players(Device);
            Items(Device);
            Glow.Start();
        }
示例#2
0
        public static void Start(RenderTarget Device)
        {
            spectatorString = "Spectators:\n";
            visuals         = Settings.userSettings.VisualSettings;
            visColors       = Settings.userSettings.VisualColors;

            if (!visuals.Enabled)
            {
                if (!Settings.userSettings.MiscSettings.C4Countdown)
                {
                    if (!Settings.userSettings.MiscSettings.Spectators)
                    {
                        return;
                    }
                }
            }

            Items(Device);
            Players(Device);
            Glow.Start();
        }
示例#3
0
        public static void Players(RenderTarget Device)
        {
            foreach (Entity player in EntityList.List)
            {
                if (Settings.userSettings.MiscSettings.Spectators && Local.Health > 0)
                {
                    foreach (Entity spec in EntityList.List)
                    {
                        if (player.Observe == spec.Ptr)
                        {
                            spectatorString += player.Name + " -> " + spec.Name + "\n";
                        }
                        else if (player.Observe == Local.Ptr)
                        {
                            spectatorString += player.Name + " -> " + spec.Name + "<<\n";
                        }
                    }
                    Spectators(Device);
                }

                if (!visuals.Enabled)
                {
                    continue;
                }

                if (player.Health <= 0)
                {
                    continue;
                }
                if (player.Dormant)
                {
                    continue;
                }
                if (player.isTeam && !visuals.DisplayTeam)
                {
                    continue;
                }

                Vector2 screenPos = player.Position.ToScreen();
                if (screenPos.x == -1f && screenPos.y == -1f)
                {
                    continue;
                }

                Vector2 headPos = player.BonePosition(8).ToScreen();
                if (headPos.x == -1f && headPos.y == -1f)
                {
                    continue;
                }

                DrawArea drawArea = new DrawArea();
                drawArea.height  = (int)(screenPos.y - headPos.y);
                drawArea.width   = (int)(drawArea.height / 2.1f);
                drawArea.x       = (int)((screenPos.x + headPos.x) / 2f - drawArea.width / 2f);
                drawArea.y       = (int)(headPos.y - drawArea.height / 10f);
                drawArea.height *= 1.1f;

                if (drawArea.x + drawArea.width + 20 < 0)
                {
                    continue;
                }

                if (drawArea.y + drawArea.height + 20 < 0)
                {
                    continue;
                }

                if (drawArea.x - 20 > gvar.OverlaySize.Width)
                {
                    continue;
                }

                if (drawArea.y - 20 > gvar.OverlaySize.Height)
                {
                    continue;
                }

                if (visuals.Snaplines)
                {
                    Snaplines(Device, player);
                }

                if (visuals.BoxEsp == Settings.BoxDisplay._3D)
                {
                    if (drawArea.x + drawArea.width >= 0)
                    {
                        if (drawArea.y + drawArea.height >= 0)
                        {
                            if (drawArea.x <= gvar.OverlaySize.Width)
                            {
                                if (drawArea.y <= gvar.OverlaySize.Height)
                                {
                                    Boxes3D(Device, player);
                                }
                            }
                        }
                    }
                }

                if (visuals.BoxEsp == Settings.BoxDisplay._2D)
                {
                    Boxes2D(Device, drawArea, player);
                }

                if (visuals.BoxEsp == Settings.BoxDisplay.Edges)
                {
                    BoxesEdges(Device, drawArea, player);
                }

                if (visuals.Name)
                {
                    Name(Device, drawArea, player);
                }

                if (visuals.Rank)
                {
                    Rank(Device, drawArea, player);
                }

                if (visuals.ActiveWeapon)
                {
                    ActiveWeapon(Device, drawArea, player);
                }

                if (visuals.HealthPostion != Settings.HealthDisplay.Off)
                {
                    HealthBar(Device, drawArea, player);
                }

                if (visuals.Glow || visuals.PseudoChams)
                {
                    Glow.Start(player, Settings.userSettings.VisualSettings, Settings.userSettings.VisualColors);
                }
            }
        }