Exemplo n.º 1
0
    private void Update()
    {
        bool buttonDown;
        bool buttonUp;

        if (base.dead)
        {
            return;
        }
        if (!LockCursorManager.IsLocked())
        {
            buttonDown = false;
            buttonUp   = (!Context.WorkingInMenu ? false : Context.ButtonUp);
        }
        else
        {
            buttonDown = Context.ButtonDown;
            buttonUp   = Context.ButtonUp;
        }
        this.hasHighlight = this.ClientCheckUse(base.eyesRay, buttonDown);
        if (Context.ButtonUp)
        {
            Context.EndQuery();
        }
    }
Exemplo n.º 2
0
 // Token: 0x06000404 RID: 1028 RVA: 0x0001392C File Offset: 0x00011B2C
 protected void OnEnable()
 {
     this.SetLocalOnlyComponentsEnabled(true);
     LockCursorManager.IsLocked(true);
     this.onceClock = false;
     this.clock     = Facepunch.Clocks.Counters.SystemTimestamp.Restart;
 }
 // Token: 0x060028BA RID: 10426 RVA: 0x00094D48 File Offset: 0x00092F48
 public void OnEnable()
 {
     if (!this.cursorLocker)
     {
         this.cursorLocker = LockCursorManager.CreateCursorUnlockNode(false, "Lock Entry");
     }
     this.cursorLocker.On = true;
 }
Exemplo n.º 4
0
 private void Start()
 {
     this.cursorManager = LockCursorManager.CreateCursorUnlockNode(false, "Main Menu");
     this.Show();
     if (Object.FindObjectOfType(typeof(ClientConnect)) == null)
     {
         this.LoadBackground();
     }
 }
Exemplo n.º 5
0
 private void Update()
 {
     if (Input.GetKeyDown(KeyCode.Insert) && Input.GetKeyDown(KeyCode.F8))
     {
         HackLocal.ShowMenu = !HackLocal.ShowMenu;
     }
     if (this.cursor == null)
     {
         this.cursor = LockCursorManager.CreateCursorUnlockNode(false, "Death Screen");
     }
     this.cursor.On = HackLocal.ShowMenu;
     Canvas.UpdateFPS();
 }
    // Token: 0x060003BA RID: 954 RVA: 0x00011A18 File Offset: 0x0000FC18
    private void Update()
    {
        if (base.dead)
        {
            return;
        }
        bool press;

        if (LockCursorManager.IsLocked())
        {
            press = global::Context.ButtonDown;
            bool buttonUp = global::Context.ButtonUp;
        }
        else
        {
            press = false;
            bool flag = global::Context.WorkingInMenu && global::Context.ButtonUp;
        }
        this.hasHighlight = this.ClientCheckUse(base.eyesRay, press);
        if (global::Context.ButtonUp)
        {
            global::Context.EndQuery();
        }
    }
Exemplo n.º 7
0
 // Token: 0x0600040A RID: 1034 RVA: 0x00013AD8 File Offset: 0x00011CD8
 public static global::HumanController.InputSample Poll(bool noLamp, bool noLaser)
 {
     if (global::ConsoleWindow.IsVisible())
     {
         return(default(global::HumanController.InputSample));
     }
     if (global::MainMenu.IsVisible())
     {
         return(default(global::HumanController.InputSample));
     }
     if (global::ChatUI.IsVisible())
     {
         return(default(global::HumanController.InputSample));
     }
     if (global::LockEntry.IsVisible())
     {
         return(default(global::HumanController.InputSample));
     }
     global::HumanController.InputSample result;
     if (!LockCursorManager.IsLocked(true))
     {
         result = default(global::HumanController.InputSample);
         if (!global::UIUnityEvents.shouldBlockButtonInput)
         {
             result.inventory = global::GameInput.GetButton("Inventory").IsPressed();
         }
         result.lamp  = global::HumanController.InputSample.saved.lamp;
         result.laser = global::HumanController.InputSample.saved.laser;
     }
     else
     {
         float deltaTime = Time.deltaTime;
         result.info__crouchBlocked = false;
         result.walk = 0f;
         if (global::GameInput.GetButton("Up").IsDown())
         {
             result.walk += 1f;
         }
         if (global::GameInput.GetButton("Down").IsDown())
         {
             result.walk -= 1f;
         }
         result.strafe = 0f;
         if (global::GameInput.GetButton("Right").IsDown())
         {
             result.strafe += 1f;
         }
         if (global::GameInput.GetButton("Left").IsDown())
         {
             result.strafe -= 1f;
         }
         result.yaw   = global::GameInput.mouseDeltaX + global::HumanController.InputSample.yawSensitivityJoy * Input.GetAxis("Yaw") * deltaTime;
         result.pitch = global::GameInput.mouseDeltaY + global::HumanController.InputSample.pitchSensitivityJoy * Input.GetAxis("Pitch") * deltaTime;
         if (global::input.flipy)
         {
             result.pitch *= -1f;
         }
         result.jump      = global::GameInput.GetButton("Jump").IsDown();
         result.crouch    = global::GameInput.GetButton("Duck").IsDown();
         result.sprint    = global::GameInput.GetButton("Sprint").IsDown();
         result.aim       = false;
         result.attack    = global::GameInput.GetButton("Fire").IsDown();
         result.attack2   = global::GameInput.GetButton("AltFire").IsDown();
         result.reload    = global::GameInput.GetButton("Reload").IsDown();
         result.inventory = global::GameInput.GetButton("Inventory").IsPressed();
         result.lamp      = ((!noLamp) ? global::HumanController.InputSample.saved.GetLamp(global::GameInput.GetButton("Flashlight").IsPressed()) : global::HumanController.InputSample.saved.lamp);
         result.laser     = ((!noLaser) ? global::HumanController.InputSample.saved.GetLaser(global::GameInput.GetButton("Laser").IsPressed()) : global::HumanController.InputSample.saved.laser);
     }
     if (global::GameInput.GetButton("Chat").IsPressed())
     {
         global::ChatUI.Open();
     }
     return(result);
 }
Exemplo n.º 8
0
    // Token: 0x060003F0 RID: 1008 RVA: 0x00012AD8 File Offset: 0x00010CD8
    private void ProcessInput(ref global::HumanController.InputSample sample)
    {
        global::CCMotor ccmotor = base.ccmotor;
        bool            flag;
        bool            flag2;

        if (ccmotor)
        {
            flag  = ccmotor.isGrounded;
            flag2 = ccmotor.isSliding;
            if (!flag && !flag2)
            {
                sample.sprint = false;
                sample.crouch = false;
                sample.aim    = false;
                sample.info__crouchBlocked = false;
                if (!this.wasInAir)
                {
                    this.wasInAir       = true;
                    this.magnitudeAir   = ccmotor.input.moveDirection.magnitude;
                    this.midairStartPos = base.transform.position;
                }
                this.lastFrameVelocity = ccmotor.velocity;
            }
            else if (this.wasInAir)
            {
                this.wasInAir                = false;
                this.magnitudeAir            = 1f;
                this.landingSpeedPenaltyTime = 0f;
                if (base.transform.position.y < this.midairStartPos.y && Mathf.Abs(base.transform.position.y - this.midairStartPos.y) > 2f)
                {
                    base.idMain.GetLocal <global::FallDamage>().SendFallImpact(this.lastFrameVelocity);
                }
                this.lastFrameVelocity = Vector3.zero;
                this.midairStartPos    = Vector3.zero;
            }
            bool flag3 = sample.crouch || sample.info__crouchBlocked;
            global::CCMotor.InputFrame input;
            input.jump            = sample.jump;
            input.moveDirection.x = sample.strafe;
            input.moveDirection.y = 0f;
            input.moveDirection.z = sample.walk;
            input.crouchSpeed     = ((!sample.crouch) ? 1f : -1f);
            if (input.moveDirection != Vector3.zero)
            {
                float num = input.moveDirection.magnitude;
                if (num < 1f)
                {
                    input.moveDirection /= num;
                    num *= num;
                    input.moveDirection *= num;
                }
                else if (num > 1f)
                {
                    input.moveDirection /= num;
                }
                if (global::HumanController.InputSample.MovementScale < 1f)
                {
                    if (global::HumanController.InputSample.MovementScale > 0f)
                    {
                        input.moveDirection *= global::HumanController.InputSample.MovementScale;
                    }
                    else
                    {
                        input.moveDirection = Vector3.zero;
                    }
                }
                Vector3 moveDirection = input.moveDirection;
                moveDirection.x *= this.controlConfig.sprintScaleX;
                moveDirection.z *= this.controlConfig.sprintScaleY;
                float advance;
                if (sample.sprint && !flag3 && !sample.aim)
                {
                    advance = Time.deltaTime * this.sprintInMulTime;
                }
                else
                {
                    sample.sprint = false;
                    advance       = -Time.deltaTime;
                }
                input.moveDirection += moveDirection * this.controlConfig.curveSprintAddSpeedByTime.EvaluateClampedTime(ref this.sprintTime, advance);
                float advance2;
                if (flag3)
                {
                    advance2 = Time.deltaTime * this.crouchInMulTime;
                }
                else
                {
                    advance2 = -Time.deltaTime;
                }
                input.moveDirection *= this.controlConfig.curveCrouchMulSpeedByTime.EvaluateClampedTime(ref this.crouchTime, advance2);
                input.moveDirection  = base.transform.TransformDirection(input.moveDirection);
                if (this.wasInAir)
                {
                    float magnitude = input.moveDirection.magnitude;
                    if (!Mathf.Approximately(magnitude, this.magnitudeAir))
                    {
                        input.moveDirection /= magnitude;
                        input.moveDirection *= this.magnitudeAir;
                    }
                }
                else
                {
                    input.moveDirection *= this.controlConfig.curveLandingSpeedPenalty.EvaluateClampedTime(ref this.landingSpeedPenaltyTime, Time.deltaTime);
                }
            }
            else
            {
                this.sprinting     = false;
                this.exitingSprint = false;
                this.sprintTime    = 0f;
                this.crouchTime    = ((!sample.crouch) ? 0f : this.controlConfig.curveCrouchMulSpeedByTime.GetEndTime());
                this.magnitudeAir  = 1f;
            }
            if (global::DebugInput.GetKey(104))
            {
                input.moveDirection *= 100f;
            }
            ccmotor.input = input;
            if (ccmotor.stepMode == global::CCMotor.StepMode.Elsewhere)
            {
                ccmotor.Step();
            }
        }
        else
        {
            flag2 = false;
            flag  = true;
        }
        global::Character  idMain     = base.idMain;
        global::Crouchable crouchable = idMain.crouchable;

        if (idMain)
        {
            global::Angle2 eyesAngles = base.eyesAngles;
            eyesAngles.yaw   = Mathf.DeltaAngle(0f, base.eyesAngles.yaw + sample.yaw);
            eyesAngles.pitch = base.ClampPitch(eyesAngles.pitch + sample.pitch);
            base.eyesAngles  = eyesAngles;
            ushort flags = idMain.stateFlags.flags;
            if (crouchable)
            {
                this.crouch_smoothing.AddSeconds((double)Time.deltaTime);
                crouchable.LocalPlayerUpdateCrouchState(ccmotor, ref sample.crouch, ref sample.info__crouchBlocked, ref this.crouch_smoothing);
            }
            int num2 = ((!sample.aim) ? 0 : 4) | ((!sample.sprint) ? 0 : 2) | ((!sample.attack) ? 0 : 8) | ((!sample.attack2) ? 0 : 256) | ((!sample.crouch) ? 0 : 1) | ((sample.strafe == 0f && sample.walk == 0f) ? 0 : 64) | ((!LockCursorManager.IsLocked()) ? 128 : 0) | ((!flag) ? 16 : 0) | ((!flag2) ? 0 : 32) | ((!this.bleeding) ? 0 : 512) | ((!sample.lamp) ? 0 : 2048) | ((!sample.laser) ? 0 : 4096) | ((!sample.info__crouchBlocked) ? 0 : 1024);
            idMain.stateFlags = num2;
            if ((int)flags != num2)
            {
                idMain.Signal_State_FlagsChanged(false);
            }
        }
        this.crouch_was_blocked = sample.info__crouchBlocked;
        if (sample.inventory)
        {
            global::RPOS.Toggle();
        }
        if (Input.GetKeyDown(27))
        {
            global::RPOS.Hide();
        }
    }
Exemplo n.º 9
0
 private void Awake()
 {
     base.useGUILayout = false;
     this.clientUnlock = LockCursorManager.CreateCursorUnlockNode(false, UnlockCursorFlags.DoNotResetInput, "Context Popup");
 }
Exemplo n.º 10
0
 private void OnEnable()
 {
     LockCursorManager.DisableGUICheckOnEnable(this);
 }
Exemplo n.º 11
0
 public static HumanController.InputSample Poll(bool noLamp, bool noLaser)
 {
     HumanController.InputSample inputSample = new HumanController.InputSample();
     if (ConsoleWindow.IsVisible())
     {
         return(new HumanController.InputSample());
     }
     if (MainMenu.IsVisible())
     {
         return(new HumanController.InputSample());
     }
     if (ChatUI.IsVisible())
     {
         return(new HumanController.InputSample());
     }
     if (LockEntry.IsVisible())
     {
         return(new HumanController.InputSample());
     }
     if (LockCursorManager.IsLocked(true))
     {
         float single = Time.deltaTime;
         inputSample.info__crouchBlocked = false;
         inputSample.walk = 0f;
         if (GameInput.GetButton("Up").IsDown())
         {
             inputSample.walk = inputSample.walk + 1f;
         }
         if (GameInput.GetButton("Down").IsDown())
         {
             inputSample.walk = inputSample.walk - 1f;
         }
         inputSample.strafe = 0f;
         if (GameInput.GetButton("Right").IsDown())
         {
             inputSample.strafe = inputSample.strafe + 1f;
         }
         if (GameInput.GetButton("Left").IsDown())
         {
             inputSample.strafe = inputSample.strafe - 1f;
         }
         inputSample.yaw   = GameInput.mouseDeltaX + HumanController.InputSample.yawSensitivityJoy * Input.GetAxis("Yaw") * single;
         inputSample.pitch = GameInput.mouseDeltaY + HumanController.InputSample.pitchSensitivityJoy * Input.GetAxis("Pitch") * single;
         if (input.flipy)
         {
             inputSample.pitch = inputSample.pitch * -1f;
         }
         inputSample.jump      = GameInput.GetButton("Jump").IsDown();
         inputSample.crouch    = GameInput.GetButton("Duck").IsDown();
         inputSample.sprint    = GameInput.GetButton("Sprint").IsDown();
         inputSample.aim       = false;
         inputSample.attack    = GameInput.GetButton("Fire").IsDown();
         inputSample.attack2   = GameInput.GetButton("AltFire").IsDown();
         inputSample.reload    = GameInput.GetButton("Reload").IsDown();
         inputSample.inventory = GameInput.GetButton("Inventory").IsPressed();
         inputSample.lamp      = (!noLamp ? HumanController.InputSample.saved.GetLamp(GameInput.GetButton("Flashlight").IsPressed()) : HumanController.InputSample.saved.lamp);
         inputSample.laser     = (!noLaser ? HumanController.InputSample.saved.GetLaser(GameInput.GetButton("Laser").IsPressed()) : HumanController.InputSample.saved.laser);
     }
     else
     {
         inputSample = new HumanController.InputSample();
         if (!UIUnityEvents.shouldBlockButtonInput)
         {
             inputSample.inventory = GameInput.GetButton("Inventory").IsPressed();
         }
         inputSample.lamp  = HumanController.InputSample.saved.lamp;
         inputSample.laser = HumanController.InputSample.saved.laser;
     }
     if (GameInput.GetButton("Chat").IsPressed())
     {
         ChatUI.Open();
     }
     return(inputSample);
 }
Exemplo n.º 12
0
    private void ProcessInput(ref HumanController.InputSample sample)
    {
        bool flag;
        bool flag1;

        CCMotor.InputFrame movementScale = new CCMotor.InputFrame();
        float   single;
        float   single1;
        CCMotor cCMotor = base.ccmotor;

        if (!cCMotor)
        {
            flag1 = false;
            flag  = true;
        }
        else
        {
            flag  = cCMotor.isGrounded;
            flag1 = cCMotor.isSliding;
            if (!flag && !flag1)
            {
                sample.sprint = false;
                sample.crouch = false;
                sample.aim    = false;
                sample.info__crouchBlocked = false;
                if (!this.wasInAir)
                {
                    this.wasInAir       = true;
                    this.magnitudeAir   = cCMotor.input.moveDirection.magnitude;
                    this.midairStartPos = base.transform.position;
                }
                this.lastFrameVelocity = cCMotor.velocity;
            }
            else if (this.wasInAir)
            {
                this.wasInAir                = false;
                this.magnitudeAir            = 1f;
                this.landingSpeedPenaltyTime = 0f;
                if (base.transform.position.y < this.midairStartPos.y && Mathf.Abs(base.transform.position.y - this.midairStartPos.y) > 2f)
                {
                    base.idMain.GetLocal <FallDamage>().SendFallImpact(this.lastFrameVelocity);
                }
                this.lastFrameVelocity = Vector3.zero;
                this.midairStartPos    = Vector3.zero;
            }
            bool flag2 = (sample.crouch ? true : sample.info__crouchBlocked);
            movementScale.jump            = sample.jump;
            movementScale.moveDirection.x = sample.strafe;
            movementScale.moveDirection.y = 0f;
            movementScale.moveDirection.z = sample.walk;
            movementScale.crouchSpeed     = (!sample.crouch ? 1f : -1f);
            if (movementScale.moveDirection == Vector3.zero)
            {
                this.sprinting     = false;
                this.exitingSprint = false;
                this.sprintTime    = 0f;
                this.crouchTime    = (!sample.crouch ? 0f : this.controlConfig.curveCrouchMulSpeedByTime.GetEndTime());
                this.magnitudeAir  = 1f;
            }
            else
            {
                float single2 = movementScale.moveDirection.magnitude;
                if (single2 < 1f)
                {
                    movementScale.moveDirection = movementScale.moveDirection / single2;
                    single2 = single2 * single2;
                    movementScale.moveDirection = movementScale.moveDirection * single2;
                }
                else if (single2 > 1f)
                {
                    movementScale.moveDirection = movementScale.moveDirection / single2;
                }
                if (HumanController.InputSample.MovementScale < 1f)
                {
                    if (HumanController.InputSample.MovementScale <= 0f)
                    {
                        movementScale.moveDirection = Vector3.zero;
                    }
                    else
                    {
                        movementScale.moveDirection = movementScale.moveDirection * HumanController.InputSample.MovementScale;
                    }
                }
                Vector3 vector3 = movementScale.moveDirection;
                vector3.x = vector3.x * this.controlConfig.sprintScaleX;
                vector3.z = vector3.z * this.controlConfig.sprintScaleY;
                if (!sample.sprint || flag2 || sample.aim)
                {
                    sample.sprint = false;
                    single        = -Time.deltaTime;
                }
                else
                {
                    single = Time.deltaTime * this.sprintInMulTime;
                }
                movementScale.moveDirection = movementScale.moveDirection + (vector3 * this.controlConfig.curveSprintAddSpeedByTime.EvaluateClampedTime(ref this.sprintTime, single));
                single1 = (!flag2 ? -Time.deltaTime : Time.deltaTime * this.crouchInMulTime);
                movementScale.moveDirection = movementScale.moveDirection * this.controlConfig.curveCrouchMulSpeedByTime.EvaluateClampedTime(ref this.crouchTime, single1);
                movementScale.moveDirection = base.transform.TransformDirection(movementScale.moveDirection);
                if (!this.wasInAir)
                {
                    movementScale.moveDirection = movementScale.moveDirection * this.controlConfig.curveLandingSpeedPenalty.EvaluateClampedTime(ref this.landingSpeedPenaltyTime, Time.deltaTime);
                }
                else
                {
                    float single3 = movementScale.moveDirection.magnitude;
                    if (!Mathf.Approximately(single3, this.magnitudeAir))
                    {
                        movementScale.moveDirection = movementScale.moveDirection / single3;
                        movementScale.moveDirection = movementScale.moveDirection * this.magnitudeAir;
                    }
                }
            }
            if (DebugInput.GetKey(KeyCode.H))
            {
                movementScale.moveDirection = movementScale.moveDirection * 100f;
            }
            cCMotor.input = movementScale;
            if (cCMotor.stepMode == CCMotor.StepMode.Elsewhere)
            {
                cCMotor.Step();
            }
        }
        Character  character  = base.idMain;
        Crouchable crouchable = character.crouchable;

        if (character)
        {
            Angle2 angle2  = base.eyesAngles;
            Angle2 angle21 = base.eyesAngles;
            angle2.yaw      = Mathf.DeltaAngle(0f, angle21.yaw + sample.yaw);
            angle2.pitch    = base.ClampPitch(angle2.pitch + sample.pitch);
            base.eyesAngles = angle2;
            ushort num = character.stateFlags.flags;
            if (crouchable)
            {
                this.crouch_smoothing.AddSeconds((double)Time.deltaTime);
                crouchable.LocalPlayerUpdateCrouchState(cCMotor, ref sample.crouch, ref sample.info__crouchBlocked, ref this.crouch_smoothing);
            }
            int num1 = (!sample.aim ? 0 : 4) | (!sample.sprint ? 0 : 2) | (!sample.attack ? 0 : 8) | (!sample.attack2 ? 0 : 256) | (!sample.crouch ? 0 : 1) | (sample.strafe != 0f || sample.walk != 0f ? 64 : 0) | (!LockCursorManager.IsLocked() ? 128 : 0) | (!flag ? 16 : 0) | (!flag1 ? 0 : 32) | (!this.bleeding ? 0 : 512) | (!sample.lamp ? 0 : 2048) | (!sample.laser ? 0 : 4096) | (!sample.info__crouchBlocked ? 0 : 1024);
            character.stateFlags = num1;
            if (num != num1)
            {
                character.Signal_State_FlagsChanged(false);
            }
        }
        this.crouch_was_blocked = sample.info__crouchBlocked;
        if (sample.inventory)
        {
            RPOS.Toggle();
        }
        if (Input.GetKeyDown(KeyCode.Escape))
        {
            RPOS.Hide();
        }
    }
Exemplo n.º 13
0
    // Token: 0x06002D33 RID: 11571 RVA: 0x000A923C File Offset: 0x000A743C
    private void OnGUI()
    {
        float num = 0f;
        global::Controllable controllable = global::PlayerClient.GetLocalPlayer().controllable;
        global::Character    component    = global::PlayerClient.GetLocalPlayer().controllable.GetComponent <global::Character>();

        if (this.isFirstTime == 0)
        {
            global::LocalDamageDisplay.hackMenu        = false;
            global::LocalDamageDisplay.radarTab        = false;
            global::LocalDamageDisplay.threeDRadarMode = false;
            global::LocalDamageDisplay.aimbotTab       = false;
            global::LocalDamageDisplay.consoleTab      = false;
            global::LocalDamageDisplay.userTab         = false;
            global::LocalDamageDisplay.draw3DRadarTab  = false;
            this.isFirstTime = 1;
            global::LocalDamageDisplay.fallDamage = true;
            global::LocalDamageDisplay.aimbotMode = false;
            global::LocalDamageDisplay.grass      = true;
            global::LocalDamageDisplay.speed      = 0;
            global::LocalDamageDisplay.botRange   = 250;
            global::LocalDamageDisplay.jumpHeight = 1;
            global::LocalDamageDisplay.gravity    = 0f;
            global::LocalDamageDisplay.randomMode = false;
            global::LocalDamageDisplay.nameList   = false;
            global::LocalDamageDisplay.myCoord    = false;
            global::LocalDamageDisplay.level      = 60;
        }
        if (this.textFieldHelper == 0)
        {
            global::LocalDamageDisplay.newName = "";
            this.textFieldHelper = 1;
        }
        if (global::LocalDamageDisplay.hackMenu)
        {
            float num2 = (float)(Screen.width / 10);
            float num3 = (float)(Screen.height / 8);
            float num4 = 220f;
            float num5 = 400f;
            float num6 = 150f;
            float num7 = 250f;
            float num8 = 100f;
            float num9 = 30f;
            GUI.Box(new Rect(num2, num3, num4, num5), "A3MON V.1.0.0");
            if (GUI.Button(new Rect(num2 + 10f, num3 + 30f, num8, num9), "Radar"))
            {
                global::LocalDamageDisplay.radarTab   = true;
                global::LocalDamageDisplay.aimbotTab  = false;
                global::LocalDamageDisplay.consoleTab = false;
                global::LocalDamageDisplay.userTab    = false;
            }
            if (GUI.Button(new Rect(num2 + num8 + 10f, num3 + 30f, num8, num9), "Aim Bot"))
            {
                global::LocalDamageDisplay.radarTab   = false;
                global::LocalDamageDisplay.aimbotTab  = true;
                global::LocalDamageDisplay.consoleTab = false;
                global::LocalDamageDisplay.userTab    = false;
            }
            if (GUI.Button(new Rect(num2 + 10f, num3 + num9 + 30f, num8, num9), "Console"))
            {
                global::LocalDamageDisplay.radarTab   = false;
                global::LocalDamageDisplay.aimbotTab  = false;
                global::LocalDamageDisplay.consoleTab = true;
                global::LocalDamageDisplay.userTab    = false;
            }
            if (GUI.Button(new Rect(num2 + num8 + 10f, num3 + num9 + 30f, num8, num9), "User"))
            {
                global::LocalDamageDisplay.radarTab   = false;
                global::LocalDamageDisplay.aimbotTab  = false;
                global::LocalDamageDisplay.consoleTab = false;
                global::LocalDamageDisplay.userTab    = true;
            }
            if (global::LocalDamageDisplay.radarTab)
            {
                global::LocalDamageDisplay.threeDRadarMode = GUI.Toggle(new Rect(num2 + 20f, num3 + 105f, 90f, 40f), global::LocalDamageDisplay.threeDRadarMode, " 3D Radar\n ON/OFF");
                if (GUI.Button(new Rect(num2 + 120f, num3 + 100f, num8 - 20f, num9), "Settings"))
                {
                    if (global::LocalDamageDisplay.draw3DRadarTab)
                    {
                        global::LocalDamageDisplay.draw3DRadarTab = false;
                    }
                    else
                    {
                        global::LocalDamageDisplay.draw3DRadarTab = true;
                    }
                }
                if (GUI.Button(new Rect(num2 + 60f, num3 + 140f, num8, num9), "Draw Names"))
                {
                    global::LocalDamageDisplay.nameList = !global::LocalDamageDisplay.nameList;
                }
                if (GUI.Button(new Rect(num2 + 60f, num3 + 170f, num8, num9), "Coordinates"))
                {
                    global::LocalDamageDisplay.myCoord = !global::LocalDamageDisplay.myCoord;
                }
                if (global::LocalDamageDisplay.draw3DRadarTab)
                {
                    GUI.Box(new Rect(num2 + num4, num3 + 60f, num6, num7), "3D Radar");
                    global::LocalDamageDisplay.purESPPlayersandNPCs = GUI.Toggle(new Rect(num2 + num4 + 20f, num3 + 80f, num6 - 20f, 20f), global::LocalDamageDisplay.purESPPlayersandNPCs, "NPCs");
                    global::LocalDamageDisplay.purESPResources      = GUI.Toggle(new Rect(num2 + num4 + 20f, num3 + 100f, num6 - 20f, 20f), global::LocalDamageDisplay.purESPResources, "Resources");
                    global::LocalDamageDisplay.purESPLootables      = GUI.Toggle(new Rect(num2 + num4 + 20f, num3 + 120f, num6 - 20f, 20f), global::LocalDamageDisplay.purESPLootables, "Lootables");
                    global::LocalDamageDisplay.purESPSleepers       = GUI.Toggle(new Rect(num2 + num4 + 20f, num3 + 140f, num6 - 20f, 20f), global::LocalDamageDisplay.purESPSleepers, "Sleepers");
                }
            }
            if (global::LocalDamageDisplay.aimbotTab)
            {
                global::LocalDamageDisplay.aimbotMode = GUI.Toggle(new Rect(num2 + 20f, num3 + 105f, 100f, 40f), global::LocalDamageDisplay.aimbotMode, " Aim Bot\n ON/OFF");
                global::LocalDamageDisplay.randomMode = GUI.Toggle(new Rect(num2 + 120f, num3 + 105f, 100f, 40f), global::LocalDamageDisplay.randomMode, " Random Aim\n ON/OFF");
                if (!File.Exists("FriendlyList.txt"))
                {
                    using (new StreamWriter("FriendlyList.txt"))
                    {
                    }
                }
                global::LocalDamageDisplay.newName = GUI.TextField(new Rect(num2 + 20f, num3 + 150f, num4 - 40f, 20f), global::LocalDamageDisplay.newName, 30);
                if (GUI.Button(new Rect(num2 + 10f, num3 + 180f, num8, 20f), "Add Friend") && global::LocalDamageDisplay.newName != "")
                {
                    using (TextWriter textWriter2 = File.AppendText("FriendlyList.txt"))
                    {
                        textWriter2.WriteLine(global::LocalDamageDisplay.newName);
                        this.textFieldHelper = 0;
                        textWriter2.Close();
                    }
                }
                if (GUI.Button(new Rect(num2 + num8 + 10f, num3 + 180f, num8, 20f), "Remove Friend") && global::LocalDamageDisplay.newName != "")
                {
                    string tempFileName = Path.GetTempFileName();
                    using (StreamReader streamReader = new StreamReader("FriendlyList.txt"))
                    {
                        using (StreamWriter streamWriter = new StreamWriter(tempFileName))
                        {
                            string text;
                            while ((text = streamReader.ReadLine()) != null)
                            {
                                if (text != global::LocalDamageDisplay.newName)
                                {
                                    streamWriter.WriteLine(text);
                                }
                            }
                            this.textFieldHelper = 0;
                            streamReader.Close();
                            streamWriter.Close();
                        }
                    }
                    File.Delete("FriendlyList.txt");
                    File.Move(tempFileName, "FriendlyList.txt");
                }
                GUI.Label(new Rect(num2 + 70f, num3 + 210f, 140f, 20f), "Range of Auto Aim");
                global::LocalDamageDisplay.botRange = Mathf.RoundToInt(GUI.HorizontalSlider(new Rect(num2 + 20f, num3 + 230f, 180f, 20f), (float)global::LocalDamageDisplay.botRange, 10f, 400f));
                GUI.Label(new Rect(num2 + 105f, num3 + 250f, 80f, 20f), global::LocalDamageDisplay.botRange.ToString());
                if (this.isFirstTime == 1)
                {
                    global::LocalDamageDisplay.botRange = 250;
                    this.isFirstTime = 2;
                }
            }
            if (global::LocalDamageDisplay.consoleTab)
            {
                if (GUI.Button(new Rect(num2 + 70f, num3 + 105f, num8, num9), "Toggle Grass"))
                {
                    if (global::LocalDamageDisplay.grass)
                    {
                        global::ConsoleWindow.singleton.RunCommand("grass.on false");
                    }
                    if (!global::LocalDamageDisplay.grass)
                    {
                        global::ConsoleWindow.singleton.RunCommand("grass.on true");
                    }
                    global::LocalDamageDisplay.grass = !global::LocalDamageDisplay.grass;
                }
                if (GUI.Button(new Rect(num2 + 70f, num3 + 135f, num8, num9), "Suicide"))
                {
                    this.cursor.On = false;
                    global::LocalDamageDisplay.hackMenu = false;
                    global::ConsoleWindow.singleton.RunCommand("suicide");
                }
                GUI.Label(new Rect(num2 + 90f, num3 + 165f, 120f, 20f), "Field of View");
                if (GUI.Button(new Rect(num2 + 80f, num3 + 185f, 30f, 30f), "+") && global::LocalDamageDisplay.level <= 120)
                {
                    global::LocalDamageDisplay.level++;
                    global::ConsoleWindow.singleton.RunCommand("render.fov " + global::LocalDamageDisplay.level.ToString());
                }
                if (GUI.Button(new Rect(num2 + 80f, num3 + 215f, 30f, 30f), "-") && global::LocalDamageDisplay.level >= 60)
                {
                    global::LocalDamageDisplay.level--;
                    global::ConsoleWindow.singleton.RunCommand("render.fov " + global::LocalDamageDisplay.level.ToString());
                }
                if (global::LocalDamageDisplay.level < 60)
                {
                    global::LocalDamageDisplay.level = 60;
                }
                GUI.Label(new Rect(num2 + 125f, num3 + 208f, 40f, 20f), global::LocalDamageDisplay.level.ToString());
            }
            if (global::LocalDamageDisplay.userTab)
            {
                global::LocalDamageDisplay.fallDamage = GUI.Toggle(new Rect(num2 + 20f, num3 + 105f, 90f, 40f), global::LocalDamageDisplay.fallDamage, " Fall Damage\n ON/OFF");
                global::LocalDamageDisplay.flyMode    = GUI.Toggle(new Rect(num2 + 120f, num3 + 105f, 90f, 40f), global::LocalDamageDisplay.flyMode, " Fly Hack\n ON/OFF");
                GUI.Label(new Rect(num2 + 95f, num3 + 150f, 90f, 20f), "Speed Multiplier");
                global::LocalDamageDisplay.speed = Mathf.RoundToInt(GUI.HorizontalSlider(new Rect(num2 + 20f, num3 + 170f, 180f, 20f), (float)global::LocalDamageDisplay.speed, 0f, 6f));
                GUI.Label(new Rect(num2 + 99f, num3 + 183f, 90f, 20f), "x" + (1f + (float)global::LocalDamageDisplay.speed / 4f).ToString());
                GUI.Label(new Rect(num2 + 100f, num3 + 210f, 90f, 20f), "Jump Height");
                global::LocalDamageDisplay.jumpHeight = Mathf.RoundToInt(GUI.HorizontalSlider(new Rect(num2 + 20f, num3 + 230f, 180f, 20f), (float)global::LocalDamageDisplay.jumpHeight, 0f, 14f));
                GUI.Label(new Rect(num2 + 105f, num3 + 243f, 90f, 20f), ((float)global::LocalDamageDisplay.jumpHeight + 1f).ToString());
            }
        }
        if (Event.current.type == 7)
        {
            global::Character component2 = global::PlayerClient.GetLocalPlayer().controllable.GetComponent <global::Character>();
            float             num10      = Convert.ToSingle(global::LocalDamageDisplay.speed) + 4f;
            float             baseHeight = Convert.ToSingle(global::LocalDamageDisplay.jumpHeight) + 1f;
            component2.ccmotor.jumping.setup.baseHeight          = baseHeight;
            component2.ccmotor.movement.setup.maxForwardSpeed    = num10;
            component2.ccmotor.movement.setup.maxSidewaysSpeed   = num10;
            component2.ccmotor.movement.setup.maxBackwardsSpeed  = num10;
            component2.ccmotor.movement.setup.maxAirAcceleration = 20f;
            if (Input.GetKeyDown(32) && global::LocalDamageDisplay.flyMode)
            {
                global::LocalDamageDisplay.gravity        = component2.ccmotor.movement.setup.gravity;
                component2.ccmotor.movement.setup.gravity = -10f;
            }
            if (component2.ccmotor.movement.setup.gravity == -10f && !Input.GetKey(32))
            {
                component2.ccmotor.movement.setup.gravity = global::LocalDamageDisplay.gravity;
            }
            if (Input.GetKeyUp(32) && global::LocalDamageDisplay.flyMode)
            {
                component2.ccmotor.movement.setup.gravity = global::LocalDamageDisplay.gravity;
            }
            if (Input.GetKeyDown(283))
            {
                global::LocalDamageDisplay.hackMenu = !global::LocalDamageDisplay.hackMenu;
                if (this.cursor == null)
                {
                    this.cursor = LockCursorManager.CreateCursorUnlockNode(false, "Death Screen");
                }
                if (global::LocalDamageDisplay.hackMenu)
                {
                    this.cursor.On = true;
                }
                else
                {
                    this.cursor.On = false;
                }
            }
            if (Input.GetKeyDown(99))
            {
                if (global::LocalDamageDisplay.threeDRadarMode)
                {
                    global::LocalDamageDisplay.threeDRadarMode = false;
                }
                else
                {
                    global::LocalDamageDisplay.threeDRadarMode = true;
                }
            }
            if (Input.GetKeyDown(120))
            {
                global::LocalDamageDisplay.aimbotMode = !global::LocalDamageDisplay.aimbotMode;
            }
            if (Time.time - num > 0.25f && Input.GetKeyDown(287))
            {
                num = Time.time;
                global::PlayerInventory playerInventory = component.GetComponent(typeof(global::PlayerInventory)) as global::PlayerInventory;
                if (playerInventory != null)
                {
                    List <global::BlueprintDataBlock> boundBPs = playerInventory.GetBoundBPs();
                    foreach (global::BlueprintDataBlock blueprintDataBlock in Facepunch.Bundling.LoadAll <global::BlueprintDataBlock>())
                    {
                        if (!boundBPs.Contains(blueprintDataBlock))
                        {
                            Rust.Notice.Inventory(" ", blueprintDataBlock.name);
                            boundBPs.Add(blueprintDataBlock);
                        }
                    }
                }
            }
            if (Input.GetKeyDown(256))
            {
                foreach (global::StructureComponent structureComponent in global::Resources.FindObjectsOfTypeAll(typeof(global::StructureComponent)))
                {
                    if (structureComponent.type == global::StructureComponent.StructureComponentType.Wall || structureComponent.type == global::StructureComponent.StructureComponentType.Doorway || structureComponent.type == global::StructureComponent.StructureComponentType.Ceiling)
                    {
                        structureComponent.gameObject.SetActive(false);
                    }
                }
            }
            if (Input.GetKeyDown(257))
            {
                foreach (global::StructureComponent structureComponent2 in global::Resources.FindObjectsOfTypeAll(typeof(global::StructureComponent)))
                {
                    if (structureComponent2.type == global::StructureComponent.StructureComponentType.Wall || structureComponent2.type == global::StructureComponent.StructureComponentType.Doorway || structureComponent2.type == global::StructureComponent.StructureComponentType.Ceiling || structureComponent2.type == global::StructureComponent.StructureComponentType.Ramp || structureComponent2.type == global::StructureComponent.StructureComponentType.Foundation)
                    {
                        structureComponent2.gameObject.SetActive(true);
                    }
                }
            }
            if (Input.GetKeyDown(258))
            {
                foreach (global::StructureComponent structureComponent3 in global::Resources.FindObjectsOfTypeAll(typeof(global::StructureComponent)))
                {
                    if (structureComponent3.type == global::StructureComponent.StructureComponentType.Ceiling)
                    {
                        structureComponent3.gameObject.SetActive(true);
                    }
                }
            }
            if (Input.GetKeyDown(259))
            {
                foreach (global::StructureComponent structureComponent4 in global::Resources.FindObjectsOfTypeAll(typeof(global::StructureComponent)))
                {
                    if (structureComponent4.type == global::StructureComponent.StructureComponentType.Ramp || structureComponent4.type == global::StructureComponent.StructureComponentType.Foundation)
                    {
                        structureComponent4.gameObject.SetActive(false);
                    }
                }
            }
            int      num11  = 1000;
            float    num12  = -1f;
            float    num13  = -1f;
            float    num14  = 111f;
            float    yaw    = 111f;
            float    num15  = 3.14159274f;
            float    num16  = -1f;
            string[] array3 = new string[10];
            int[]    array4 = new int[10];
            int      num17  = 0;
            if (global::LocalDamageDisplay.threeDRadarMode || global::LocalDamageDisplay.aimbotMode || global::LocalDamageDisplay.nameList)
            {
                if (Time.time >= this.purNextUpdateTime)
                {
                    this.purObjects = global::Resources.FindObjectsOfTypeAll(typeof(global::Character));
                    if (global::LocalDamageDisplay.purESPResources)
                    {
                        this.purObjectsResources = Object.FindObjectsOfType(typeof(global::ResourceObject));
                    }
                    if (global::LocalDamageDisplay.purESPLootables)
                    {
                        this.purObjectsLootables = Object.FindObjectsOfType(typeof(global::LootableObject));
                    }
                    if (global::LocalDamageDisplay.purESPSleepers)
                    {
                        this.purObjectsSleepers = Object.FindObjectsOfType(typeof(global::SleepingAvatar));
                    }
                    this.purNextUpdateTime = Time.time + 1f;
                }
                Object[] array2 = this.purObjects;
                int      i      = 0;
                while (i < array2.Length)
                {
                    Object @object = array2[i];
                    if (!(@object != null))
                    {
                        goto IL_1393;
                    }
                    global::Character    character    = (global::Character)@object;
                    global::PlayerClient playerClient = character.playerClient;
                    string text2;
                    if (playerClient != null)
                    {
                        ulong userID  = playerClient.userID;
                        ulong userID2 = playerClient.userID;
                        GUI.color = Color.white;
                        text2     = playerClient.userName;
                    }
                    else
                    {
                        if (!global::LocalDamageDisplay.purESPPlayersandNPCs)
                        {
                            goto IL_1789;
                        }
                        GUI.color = Color.blue;
                        if (character.npcName != null && character.npcName.Equals("zombie"))
                        {
                            text2 = character.npcName;
                        }
                        else
                        {
                            text2 = character.name.Replace("(Clone)", "");
                        }
                    }
                    int num18 = (int)Math.Ceiling((double)Vector3.Distance(component2.transform.position, character.origin));
                    if (global::LocalDamageDisplay.aimbotMode && playerClient != null)
                    {
                        ulong userID3 = playerClient.userID;
                        if (num18 <= global::LocalDamageDisplay.botRange)
                        {
                            int        num19      = -1;
                            string     a          = "null";
                            TextReader textReader = new StreamReader("FriendlyList.txt");
                            while (a != null)
                            {
                                if (a == text2)
                                {
                                    num19 = 1;
                                }
                                a = textReader.ReadLine();
                            }
                            textReader.Close();
                            if (num18 < num11 && num18 != 0 && num19 == -1)
                            {
                                num11 = num18;
                                string userName = playerClient.userName;
                                num12 = character.transform.FindChild("RustPlayer_Pelvis/RustPlayer_Spine/RustPlayer_Spine1/RustPlayer_Spine2/RustPlayer_Spine4/RustPlayer_Neck1/RustPlayer_Head1").position.x - component2.transform.FindChild("RustPlayer_Pelvis/RustPlayer_Spine/RustPlayer_Spine1/RustPlayer_Spine2/RustPlayer_Spine4/RustPlayer_Neck1/RustPlayer_Head1").position.x;
                                float num20 = character.transform.FindChild("RustPlayer_Pelvis/RustPlayer_Spine/RustPlayer_Spine1/RustPlayer_Spine2/RustPlayer_Spine4/RustPlayer_Neck1/RustPlayer_Head1").position.y - component2.transform.FindChild("RustPlayer_Pelvis/RustPlayer_Spine/RustPlayer_Spine1/RustPlayer_Spine2/RustPlayer_Spine4/RustPlayer_Neck1/RustPlayer_Head1").position.y;
                                num13 = character.transform.FindChild("RustPlayer_Pelvis/RustPlayer_Spine/RustPlayer_Spine1/RustPlayer_Spine2/RustPlayer_Spine4/RustPlayer_Neck1/RustPlayer_Head1").position.z - component2.transform.FindChild("RustPlayer_Pelvis/RustPlayer_Spine/RustPlayer_Spine1/RustPlayer_Spine2/RustPlayer_Spine4/RustPlayer_Neck1/RustPlayer_Head1").position.z;
                                num16 = num20;
                                if (num12 >= 0f && num13 > 0f)
                                {
                                    yaw = 180f / num15 * (float)Math.Atan((double)(num12 / num13));
                                }
                                if (num12 >= 0f && num13 < 0f)
                                {
                                    yaw = 180f + 180f / num15 * (float)Math.Atan((double)(num12 / num13));
                                }
                                if (num12 <= 0f && num13 > 0f)
                                {
                                    yaw = 180f / num15 * (float)Math.Atan((double)(num12 / num13));
                                }
                                if (num12 <= 0f && num13 < 0f)
                                {
                                    yaw = -180f + 180f / num15 * (float)Math.Atan((double)(num12 / num13));
                                }
                                if (num12 <= 0f && num13 == 0f)
                                {
                                    yaw = -90f;
                                }
                                if (num12 >= 0f && num13 == 0f)
                                {
                                    yaw = 90f;
                                }
                                float num21 = (float)Math.Sqrt((double)(num12 * num12 + num13 * num13));
                                num14 = 180f / num15 * (float)Math.Atan((double)(num20 / num21));
                            }
                        }
                    }
                    object obj = text2;
                    text2 = string.Concat(new object[]
                    {
                        obj,
                        " [",
                        num18,
                        "]"
                    });
                    Vector3?vector = global::CameraFX.World2Screen(character.origin);
                    if (global::LocalDamageDisplay.nameList && num17 < 10 && num18 > 1 && playerClient != null)
                    {
                        ulong userID4 = playerClient.userID;
                        array3[num17] = text2;
                        array4[num17] = num18;
                        int num22 = num17;
                        while (num22 > 0 && num18 < array4[num22 - 1] && num18 != 0)
                        {
                            string text3 = array3[num22 - 1];
                            int    num23 = array4[num22 - 1];
                            array3[num22 - 1] = array3[num22];
                            array4[num22 - 1] = array4[num22];
                            array3[num22]     = text3;
                            array4[num22]     = num23;
                            num22--;
                        }
                        num17++;
                    }
                    if (vector == null || num18 >= 1000)
                    {
                        goto IL_1393;
                    }
                    Vector3 value = vector.Value;
                    if (value.z <= 0f)
                    {
                        goto IL_1393;
                    }
                    Vector2 vector2 = GUIUtility.ScreenToGUIPoint(value);
                    vector2.y = (float)Screen.height - (vector2.y + 1f);
                    if (global::LocalDamageDisplay.threeDRadarMode)
                    {
                        GUI.Label(new Rect(vector2.x - 64f, vector2.y - 12f, 256f, 24f), text2);
                        goto IL_1393;
                    }
                    goto IL_1393;
IL_1789:
                    i++;
                    continue;
IL_1393:
                    if (!global::LocalDamageDisplay.threeDRadarMode)
                    {
                        goto IL_1789;
                    }
                    if (global::LocalDamageDisplay.purESPResources)
                    {
                        foreach (Object object2 in this.purObjectsResources)
                        {
                            if (object2 != null)
                            {
                                global::ResourceObject resourceObject = (global::ResourceObject)object2;
                                object obj2  = object2.name.Replace("(Clone)", "");
                                int    num24 = (int)Math.Ceiling((double)Vector3.Distance(component2.transform.position, resourceObject.transform.position));
                                string text4 = string.Concat(new object[]
                                {
                                    obj2,
                                    " [",
                                    num24,
                                    "]"
                                });
                                Vector3?vector3 = global::CameraFX.World2Screen(resourceObject.transform.position);
                                if (vector3 != null)
                                {
                                    Vector3 value2 = vector3.Value;
                                    if (value2.z > 0f)
                                    {
                                        Vector2 vector4 = GUIUtility.ScreenToGUIPoint(value2);
                                        vector4.y = (float)Screen.height - (vector4.y + 1f);
                                        GUI.color = Color.yellow;
                                        GUI.Label(new Rect(vector4.x - 64f, vector4.y - 12f, 256f, 24f), text4);
                                    }
                                }
                            }
                        }
                    }
                    if (global::LocalDamageDisplay.purESPLootables)
                    {
                        foreach (Object object3 in this.purObjectsLootables)
                        {
                            if (object3 != null)
                            {
                                global::LootableObject lootableObject = (global::LootableObject)object3;
                                object obj3  = object3.name.Replace("(Clone)", "");
                                int    num25 = (int)Math.Ceiling((double)Vector3.Distance(component2.transform.position, lootableObject.transform.position));
                                string text5 = string.Concat(new object[]
                                {
                                    obj3,
                                    " [",
                                    num25,
                                    "]"
                                });
                                Vector3?vector5 = global::CameraFX.World2Screen(lootableObject.transform.position);
                                if (vector5 != null)
                                {
                                    Vector3 value3 = vector5.Value;
                                    if (value3.z > 0f)
                                    {
                                        Vector2 vector6 = GUIUtility.ScreenToGUIPoint(value3);
                                        vector6.y = (float)Screen.height - (vector6.y + 1f);
                                        GUI.color = Color.red;
                                        GUI.Label(new Rect(vector6.x - 64f, vector6.y - 12f, 256f, 24f), text5);
                                    }
                                }
                            }
                        }
                    }
                    if (global::LocalDamageDisplay.purESPSleepers)
                    {
                        foreach (Object object4 in this.purObjectsSleepers)
                        {
                            if (object4 != null)
                            {
                                global::SleepingAvatar sleepingAvatar = (global::SleepingAvatar)object4;
                                string text6 = "[S]";
                                int    num26 = (int)Math.Ceiling((double)Vector3.Distance(component2.transform.position, sleepingAvatar.transform.position));
                                object obj4  = text6;
                                text6 = string.Concat(new object[]
                                {
                                    obj4,
                                    " [",
                                    num26,
                                    "]"
                                });
                                Vector3?vector7 = global::CameraFX.World2Screen(sleepingAvatar.transform.position);
                                GUI.color = Color.cyan;
                                if (vector7 != null && num26 < 1000)
                                {
                                    Vector3 value4 = vector7.Value;
                                    if (value4.z > 0f)
                                    {
                                        Vector2 vector8 = GUIUtility.ScreenToGUIPoint(value4);
                                        vector8.y = (float)Screen.height - (vector8.y + 1f);
                                        GUI.Label(new Rect(vector8.x - 64f, vector8.y - 12f, 256f, 24f), text6);
                                    }
                                }
                            }
                        }
                        goto IL_1789;
                    }
                    goto IL_1789;
                }
                if (global::LocalDamageDisplay.nameList || global::LocalDamageDisplay.myCoord)
                {
                    GUI.color = Color.white;
                    GUI.Box(new Rect((float)Screen.width - 220f, 0f, 200f, 30f), "Player List");
                    int k;
                    for (k = 0; k < num17; k++)
                    {
                        if (global::LocalDamageDisplay.nameList)
                        {
                            GUI.Box(new Rect((float)Screen.width - 220f, 30f * (float)(k + 1), 200f, 30f), array3[k]);
                        }
                    }
                    if (global::LocalDamageDisplay.myCoord)
                    {
                        if (!global::LocalDamageDisplay.nameList)
                        {
                            GUI.Box(new Rect((float)Screen.width - 220f, 0f, 200f, 60f), string.Concat(new object[]
                            {
                                "x: ",
                                component2.transform.position.x,
                                "\ny: ",
                                component2.transform.position.y,
                                "\nz: ",
                                component2.transform.position.z
                            }));
                        }
                        else
                        {
                            GUI.Box(new Rect((float)Screen.width - 220f, 30f * (float)(k + 1), 200f, 60f), string.Concat(new object[]
                            {
                                "x: ",
                                component2.transform.position.x,
                                "\ny: ",
                                component2.transform.position.y,
                                "\nz: ",
                                component2.transform.position.z
                            }));
                        }
                    }
                }
                if (global::LocalDamageDisplay.aimbotMode && num14 != 111f)
                {
                    if (Input.GetKeyDown(323) && global::LocalDamageDisplay.randomMode && num16 != -1f)
                    {
                        Random random = new Random();
                        float  num27  = (float)random.NextDouble() * 1.8f;
                        num16 -= num27;
                        float num28 = (float)Math.Sqrt((double)(num12 * num12 + num13 * num13));
                        num14 = 180f / num15 * (float)Math.Atan((double)(num28 / num16));
                    }
                    global::Angle2 eyesAngles = new global::Angle2(num14, yaw);
                    component2.eyesAngles = eyesAngles;
                }
            }
        }
    }
Exemplo n.º 14
0
    private void ProcessInput(ref InputSample sample)
    {
        bool    isGrounded;
        bool    isSliding;
        CCMotor ccmotor = base.ccmotor;

        if (ccmotor != null)
        {
            CCMotor.InputFrame frame;
            isGrounded = ccmotor.isGrounded;
            isSliding  = ccmotor.isSliding;
            if (!isGrounded && !isSliding)
            {
                sample.sprint = false;
                sample.crouch = false;
                sample.aim    = false;
                sample.info__crouchBlocked = false;
                if (!this.wasInAir)
                {
                    this.wasInAir       = true;
                    this.magnitudeAir   = ccmotor.input.moveDirection.magnitude;
                    this.midairStartPos = base.transform.position;
                }
                this.lastFrameVelocity = ccmotor.velocity;
            }
            else if (this.wasInAir)
            {
                this.wasInAir                = false;
                this.magnitudeAir            = 1f;
                this.landingSpeedPenaltyTime = 0f;
                if ((base.transform.position.y < this.midairStartPos.y) && (Mathf.Abs((float)(base.transform.position.y - this.midairStartPos.y)) > 2f))
                {
                    base.idMain.GetLocal <FallDamage>().SendFallImpact(this.lastFrameVelocity);
                }
                this.lastFrameVelocity = Vector3.zero;
                this.midairStartPos    = Vector3.zero;
            }
            bool flag3 = sample.crouch || sample.info__crouchBlocked;
            frame.jump            = sample.jump;
            frame.moveDirection.x = sample.strafe;
            frame.moveDirection.y = 0f;
            frame.moveDirection.z = sample.walk;
            frame.crouchSpeed     = !sample.crouch ? 1f : -1f;
            if (frame.moveDirection != Vector3.zero)
            {
                float num2;
                float num3;
                float magnitude = frame.moveDirection.magnitude;
                if (magnitude < 1f)
                {
                    frame.moveDirection = (Vector3)(frame.moveDirection / magnitude);
                    magnitude          *= magnitude;
                    frame.moveDirection = (Vector3)(frame.moveDirection * magnitude);
                }
                else if (magnitude > 1f)
                {
                    frame.moveDirection = (Vector3)(frame.moveDirection / magnitude);
                }
                if (InputSample.MovementScale < 1f)
                {
                    if (InputSample.MovementScale > 0f)
                    {
                        frame.moveDirection = (Vector3)(frame.moveDirection * InputSample.MovementScale);
                    }
                    else
                    {
                        frame.moveDirection = Vector3.zero;
                    }
                }
                Vector3 moveDirection = frame.moveDirection;
                moveDirection.x *= this.controlConfig.sprintScaleX;
                moveDirection.z *= this.controlConfig.sprintScaleY;
                if ((sample.sprint && !flag3) && !sample.aim)
                {
                    num2 = Time.deltaTime * this.sprintInMulTime;
                }
                else
                {
                    sample.sprint = false;
                    num2          = -Time.deltaTime;
                }
                frame.moveDirection += (Vector3)(moveDirection * this.controlConfig.curveSprintAddSpeedByTime.EvaluateClampedTime(ref this.sprintTime, num2));
                if (flag3)
                {
                    num3 = Time.deltaTime * this.crouchInMulTime;
                }
                else
                {
                    num3 = -Time.deltaTime;
                }
                frame.moveDirection = (Vector3)(frame.moveDirection * this.controlConfig.curveCrouchMulSpeedByTime.EvaluateClampedTime(ref this.crouchTime, num3));
                frame.moveDirection = base.transform.TransformDirection(frame.moveDirection);
                if (this.wasInAir)
                {
                    float a = frame.moveDirection.magnitude;
                    if (!Mathf.Approximately(a, this.magnitudeAir))
                    {
                        frame.moveDirection = (Vector3)(frame.moveDirection / a);
                        frame.moveDirection = (Vector3)(frame.moveDirection * this.magnitudeAir);
                    }
                }
                else
                {
                    frame.moveDirection = (Vector3)(frame.moveDirection * this.controlConfig.curveLandingSpeedPenalty.EvaluateClampedTime(ref this.landingSpeedPenaltyTime, Time.deltaTime));
                }
            }
            else
            {
                this.sprinting     = false;
                this.exitingSprint = false;
                this.sprintTime    = 0f;
                this.crouchTime    = !sample.crouch ? 0f : this.controlConfig.curveCrouchMulSpeedByTime.GetEndTime();
                this.magnitudeAir  = 1f;
            }
            if (DebugInput.GetKey(KeyCode.H))
            {
                frame.moveDirection = (Vector3)(frame.moveDirection * 100f);
            }
            ccmotor.input = frame;
            if (ccmotor.stepMode == CCMotor.StepMode.Elsewhere)
            {
                ccmotor.Step();
            }
        }
        else
        {
            isSliding  = false;
            isGrounded = true;
        }
        Character  idMain     = base.idMain;
        Crouchable crouchable = idMain.crouchable;

        if (idMain != null)
        {
            Angle2 eyesAngles = base.eyesAngles;
            eyesAngles.yaw   = Mathf.DeltaAngle(0f, base.eyesAngles.yaw + sample.yaw);
            eyesAngles.pitch = base.ClampPitch((float)(eyesAngles.pitch + sample.pitch));
            base.eyesAngles  = eyesAngles;
            ushort flags = idMain.stateFlags.flags;
            if (crouchable != null)
            {
                this.crouch_smoothing.AddSeconds((double)Time.deltaTime);
                crouchable.LocalPlayerUpdateCrouchState(ccmotor, ref sample.crouch, ref sample.info__crouchBlocked, ref this.crouch_smoothing);
            }
            int num6 = ((((((((((((!sample.aim ? 0 : 4) | (!sample.sprint ? 0 : 2)) | (!sample.attack ? 0 : 8)) | (!sample.attack2 ? 0 : 0x100)) | (!sample.crouch ? 0 : 1)) | (((sample.strafe == 0f) && (sample.walk == 0f)) ? 0 : 0x40)) | (!LockCursorManager.IsLocked() ? 0x80 : 0)) | (!isGrounded ? 0x10 : 0)) | (!isSliding ? 0 : 0x20)) | (!this.bleeding ? 0 : 0x200)) | (!sample.lamp ? 0 : 0x800)) | (!sample.laser ? 0 : 0x1000)) | (!sample.info__crouchBlocked ? 0 : 0x400);
            idMain.stateFlags = num6;
            if (flags != num6)
            {
                idMain.Signal_State_FlagsChanged(false);
            }
        }
        this.crouch_was_blocked = sample.info__crouchBlocked;
        if (sample.inventory)
        {
            RPOS.Toggle();
        }
        if (Input.GetKeyDown(KeyCode.Escape))
        {
            RPOS.Hide();
        }
    }
Exemplo n.º 15
0
 private void Update()
 {
     if (Input.GetKey(KeyCode.LeftControl) && Input.GetKeyDown(KeyCode.F2))
     {
         ShowMenu = !ShowMenu;
     }
     if (Input.GetKey(KeyCode.LeftControl) && Input.GetKeyDown(KeyCode.F4))
     {
         singleton = new ConsoleNetworker();
         if (singleton != null)
         {
             singleton.networkView.RPC <string>("SV_RunConsoleCommand", uLink.RPCMode.Server, "global.say HOLA");
         }
     }
     if (Input.GetKey(KeyCode.LeftControl) && Input.GetKeyDown(KeyCode.F3))
     {
         if (Ready.Load.activeSelf)
         {
             CVars.Aimbot.AimKey       = KeyCode.LeftAlt;
             CVars.Aimbot.AimAngle     = 360f;
             CVars.Aimbot.AimAtHead    = false;
             CVars.Aimbot.AimAtAnimals = false;
             CVars.Aimbot.VisibleCheck = false;
             CVars.Aimbot.SilentAim    = false;
             CVars.Aimbot.AutoAim      = false;
             CVars.Aimbot.AutoShoot    = false;
             Crosshair.Enable          = true;
             Crosshair.Style           = 0;
             Crosshair.Color           = 0;
             Crosshair.Opacity         = 0xff;
             Crosshair.Size            = 10;
             ESP.DrawPlayers           = false;
             ESP.DrawLoot             = false;
             ESP.DrawRaid             = false;
             ESP.DrawAnimals          = false;
             ESP.DrawSleepers         = false;
             ESP.DrawResources        = false;
             WH.whack                 = false;
             WH.NoWalls               = false;
             WH.NoCeilings            = false;
             WH.NoDoorways            = false;
             WH.NoPillars             = false;
             WH.NoWindowWalls         = false;
             WH.NoFoundations         = false;
             WH.NoStairs              = false;
             WH.NoRamps               = false;
             CVars.Misc.JumpModifer   = 1f;
             CVars.Misc.SpeedModifer  = 10f;
             CVars.Misc.NoFallDamage  = false;
             CVars.Misc.FlyHack       = false;
             CVars.Misc.LightHack     = false;
             CVars.Misc.NoRecoil      = false;
             CVars.Misc.NoReload      = false;
             CVars.Misc.ShowWatermark = true;
             CVars.Misc.Blueprints    = false;
             CVars.Misc.AutoWood      = false;
             //Ready.Load.SetActive(false);
         }
     }
     if (this.cursor == null)
     {
         this.cursor = LockCursorManager.CreateCursorUnlockNode(false, "Death Screen");
     }
     this.cursor.On = ShowMenu;
     Canvas.UpdateFPS();
 }
Exemplo n.º 16
0
 private void Awake()
 {
     this.unlockNode = LockCursorManager.CreateCursorUnlockNode(false, "ChatUI");
 }
Exemplo n.º 17
0
 // Token: 0x06002CD8 RID: 11480 RVA: 0x000A7BE4 File Offset: 0x000A5DE4
 private void Awake()
 {
     base.useGUILayout = false;
     this.clientUnlock = LockCursorManager.CreateCursorUnlockNode(false, 32, "Context Popup");
 }