public TransformingPlayer(AActor controller, Transform playerTransform, float startTime, int dir)
 {
     this.controller = controller;
     this.playerTransform = playerTransform;
     this.startTime = startTime;
     this.dir = dir;
 }
    private void SetScore(AActor actor)
    {
        int index = actor.PlayerNumber - 1;
        previousRoundScores[index] = actor.GetScore().ToString();

    }
Esempio n. 3
0
        public static void OnDeviceDraw()
        {
            if (Utils.IsGameOnDisplay())
            {
                //When ~ key is pressed...
                DrawMenu();
                Aimbot.BeginFrame();
                List <List <AActor> > actors = Main.actors;
                if (actors == null)
                {
                    return;
                }
                if (DrawingProperties["DrawPlayers"])
                {
                    for (int i = 0; i < actors[0].Count; i++)
                    {
                        AActor actor = actors[0][i];
                        if (actor.TeamID != Main.localPawn.TeamID && actor.PlayerName.ToString() != Main.localPawn.PlayerName.ToString() && Main.localPawn.IsPlayer)
                        {
                            Aimbot.EvaluateTarget(actor);
                            if (DrawingProperties["DrawSkelton"])
                            {
                                ESP.DrawSkelton(actor, ScreenSize, SkeltonColor);
                            }
                            if (DrawingProperties["Draw2dBox"])
                            {
                                ESP.DrawBox(actors[0][i], ScreenSize, BoxColor);
                            }
                            if (DrawingProperties["Draw3dBox"])
                            {
                                ESP.DrawBox3d(actors[0][i], ScreenSize, BoxColor);
                            }
                            ESP.DrawPlayerDetils(actors[0][i], ScreenSize, BoxColor);
                        }
                    }
                }
                if (DrawingProperties["DrawCrosshair"])
                {
                    int   crosshairtype = 0;
                    float CenterX       = ScreenSize.X / 2;
                    float CenterY       = ScreenSize.Y / 2;
                    switch (crosshairtype)
                    {
                    case 0:

                        DrawFactory.DrawFilledBox(CenterX - 20, CenterY, 40, 1, Color.Purple); //Purple
                        DrawFactory.DrawFilledBox(CenterX, CenterY - 20, 1, 40, Color.Purple);
                        DrawFactory.DrawFilledBox(CenterX - 17, CenterY, 34, 1, Color.Blue);   //Blue
                        DrawFactory.DrawFilledBox(CenterX, CenterY - 17, 1, 34, Color.Blue);
                        DrawFactory.DrawFilledBox(CenterX - 14, CenterY, 28, 1, Color.Cyan);   //Cyan
                        DrawFactory.DrawFilledBox(CenterX, CenterY - 14, 1, 28, Color.Cyan);
                        DrawFactory.DrawFilledBox(CenterX - 11, CenterY, 22, 1, Color.Green);  //Green
                        DrawFactory.DrawFilledBox(CenterX, CenterY - 11, 1, 22, Color.Green);
                        DrawFactory.DrawFilledBox(CenterX - 9, CenterY, 18, 1, Color.Yellow);  //Yellow
                        DrawFactory.DrawFilledBox(CenterX, CenterY - 9, 1, 18, Color.Yellow);
                        DrawFactory.DrawFilledBox(CenterX - 6, CenterY, 12, 1, Color.Orange);  //Orange
                        DrawFactory.DrawFilledBox(CenterX, CenterY - 6, 1, 12, Color.Orange);
                        DrawFactory.DrawFilledBox(CenterX - 3, CenterY, 6, 1, Color.Red);      //Red
                        DrawFactory.DrawFilledBox(CenterX, CenterY - 3, 1, 6, Color.Red);
                        break;

                    case 1:
                        DrawFactory.DrawCircle((int)CenterX, (int)CenterY, 8, 50, Color.Red); //Circle
                        DrawFactory.DrawFilledBox(CenterX - 17, CenterY, 10, 1, Color.Red);   //Left line
                        DrawFactory.DrawFilledBox(CenterX + 9, CenterY, 10, 1, Color.Red);    // Right line
                        DrawFactory.DrawFilledBox(CenterX, CenterY - 17, 1, 10, Color.Red);   //Top line
                        DrawFactory.DrawFilledBox(CenterX, CenterY + 9, 1, 10, Color.Red);    //Bottom line
                        DrawFactory.DrawPoint(CenterX, CenterY, Color.Green);                 //Dot point
                        break;
                    }
                }
                if (DrawingProperties["DrawFOV"])
                {
                    float CenterX = ScreenSize.X / 2;
                    float CenterY = ScreenSize.Y / 2;
                    DrawFactory.DrawCircle((int)CenterX, (int)CenterY, FOV, 50, Color.Black);
                }
                if (DrawingProperties["DrawLoot"])
                {
                    for (int i = 0; i < actors[1].Count; i++)
                    {
                        AActor actor = actors[1][i];

                        ESP.DrawItem(actor, ScreenSize);
                    }
                }
                if (DrawingProperties["DrawVehicle"])
                {
                    for (int i = 0; i < actors[2].Count; i++)
                    {
                        AActor actor = actors[2][i];
                        ESP.DrawVehicle(actor, ScreenSize);
                    }
                }
                if (DrawingProperties["Aimbot"] || DrawingProperties["MagicBullet"])
                {
                    Vector2 feetScreenLocation = Main.cameraManager.WorldToScreen(Aimbot.bestActor.GetBoneLocation(0), ScreenSize);
                    Vector3 Headd = Aimbot.bestActor.GetBoneLocation(6);
                    Headd.Z += 30;
                    Vector2 headScreenLocation = Main.cameraManager.WorldToScreen(Headd, ScreenSize);
                    float   xHeight            = feetScreenLocation.Y - headScreenLocation.Y;
                    float   xWidth             = xHeight / 2.5f;
                    Vector2 headw2s            = Main.cameraManager.WorldToScreen(Aimbot.bestActor.GetBoneLocation(6), ScreenSize);
                    DrawFactory.DrawCircle((int)headw2s.X, (int)headw2s.Y, xWidth / 6, 50, SkeltonColor);
                    if (Utils.IsKeyPressed(Keys.RButton) || Utils.IsKeyPressed(Keys.LButton))
                    {
                        Aimbot.AimToTarget();
                    }
                }
            }
        }
Esempio n. 4
0
        private void Collider_OnComponentEndOverlap(UPrimitiveComponent overlappedComponent, AActor otherActor, UPrimitiveComponent otherComp, int otherBodyIndex)
        {
            _bodyCount--;

            if (_bodyCount == 0)
            {
                _time = 0;
            }
        }
Esempio n. 5
0
 void AttachPinToManager(AActor _pin)
 {
     _pin.AttachToActor(MyOwner, new FName("None"),
                        EAttachmentRule.KeepWorld, EAttachmentRule.KeepWorld,
                        EAttachmentRule.KeepWorld, true);
 }
Esempio n. 6
0
 private void Collider_OnComponentBeginOverlap(UPrimitiveComponent overlappedComponent, AActor otherActor, UPrimitiveComponent otherComp, int otherBodyIndex, bool bFromSweep, FHitResult sweepResult)
 {
     _bodyCount++;
 }
Esempio n. 7
0
 public override void SetOwner(AActor NewOwner)
 {
     base.SetOwner(NewOwner);
 }
Esempio n. 8
0
 private void BoxOnComponentEndOverlap(UPrimitiveComponent overComp, AActor otherActor, UPrimitiveComponent otherComp, int otherBodyIndex)
 {
     Ue.ScreenDebugMessage($"EndOverlap {otherActor} don't overlap {overComp} now");
 }
Esempio n. 9
0
 private void BoxOnOnComponentBeginOverlap(UPrimitiveComponent overComp, AActor otherActor, UPrimitiveComponent otherComp, int otherbodyindex, bool bfromsweep, FHitResult sweepresult)
 {
     Ue.ScreenDebugMessage($"BeginOverlap {otherActor} don't overlap {overComp} now");
 }
Esempio n. 10
0
        public static void DrawBox3d(AActor player, Vector2 screenSize, Color color)
        {
            if (!PlayerBoxESP)
            {
                return;
            }

            SceneComponent RootComponent = player.RootComponent();
            Vector3        loclLocation  = Main.localPawn.RootComponent().RelativeLocation;
            Vector3        enimeLocation = RootComponent.RelativeLocation;
            float          distince      = Vector3.Distance(loclLocation, enimeLocation);


            Vector3 Head = player.GetBoneLocation(6);

            Head.Z += 50;
            Vector2 Heads2s = WorldToScreen(Head, screenSize);



            //if (distince > 200)
            //	continue;
            float l, w, h, o;

            l = 80f; o = 50f; //box size for standing player
            h = Vector3.Distance(player.GetBoneLocation(0), Head);
            w = h / 2;        //Vector3.Distance(player.GetBoneLocation(63), player.GetBoneLocation(64));


            float zOffset = -100f;

            //if (actor.Type == ActorTypes.Vehicle) //vehicles have a bigger box
            //{
            //	zOffset = 50;
            //	l = 200f; w = 160f; h = 80f; o = 0f;
            //}

            //build box
            Vector3 p00 = new Vector3(o, -w / 2, 0f);
            Vector3 p01 = new Vector3(o, w / 2, 0f);
            Vector3 p02 = new Vector3(o - l, w / 2, 0f);
            Vector3 p03 = new Vector3(o - l, -w / 2, 0f);

            //rotate rectangle to match actor rotation
            float  theta1 = 2.0f * (float)Math.PI * (Main.cameraManager.CameraCache.POV.Rotation.Pitch) / 180.0f;
            Matrix rotM   = Matrix.RotationZ((float)(theta1 / 2)); // rotate around Z-axis

            Vector3 curPos = new Vector3(RootComponent.RelativeLocation.X, RootComponent.RelativeLocation.Y, RootComponent.RelativeLocation.Z + zOffset);

            p00 = Vector3.TransformCoordinate(p00, rotM) + curPos;
            p01 = Vector3.TransformCoordinate(p01, rotM) + curPos;
            p02 = Vector3.TransformCoordinate(p02, rotM) + curPos;
            p03 = Vector3.TransformCoordinate(p03, rotM) + curPos;

            Vector2 s00 = WorldToScreen(p00, screenSize);
            Vector2 s01 = WorldToScreen(p01, screenSize);
            Vector2 s02 = WorldToScreen(p02, screenSize);
            Vector2 s03 = WorldToScreen(p03, screenSize);

            Vector2[] square0 = { s00, s01, s02, s03, s00 };

            for (int x = 0; x < square0.Length - 1; x++)
            {
                DrawFactory.DrawLine(square0[x].X, square0[x].Y, square0[x + 1].X, square0[x + 1].Y, 2, color);
            }


            // top rectangle
            p00.Z += h; s00 = WorldToScreen(p00, screenSize);
            p01.Z += h; s01 = WorldToScreen(p01, screenSize);
            p02.Z += h; s02 = WorldToScreen(p02, screenSize);
            p03.Z += h; s03 = WorldToScreen(p03, screenSize);

            Vector2[] square1 = { s00, s01, s02, s03, s00 };
            for (int x = 0; x < square1.Length - 1; x++)
            {
                DrawFactory.DrawLine(square1[x].X, square1[x].Y, square1[x + 1].X, square1[x + 1].Y, 2, color);
            }


            // upper/lower rectangles get connected
            DrawFactory.DrawLine(square0[0].X, square0[0].Y, square1[0].X, square1[0].Y, 2, color);
            DrawFactory.DrawLine(square0[1].X, square0[1].Y, square1[1].X, square1[1].Y, 2, color);
            DrawFactory.DrawLine(square0[2].X, square0[2].Y, square1[2].X, square1[2].Y, 2, color);
            DrawFactory.DrawLine(square0[3].X, square0[3].Y, square1[3].X, square1[3].Y, 2, color);
        }