Ejemplo n.º 1
0
        public static void MiscInitialize()
        {
            if (ConfigManager.CMisc.BunnyHop)
            {
                VClient.ForceJump = (NativeMethods.GetAsyncKeyState(KeysCode.VK_SPACE) && !BasePlayer.BhopFlag() && BasePlayer.Velocity > 25) ? VClient.SUserCMD.ButtonID.IN_JUMP : VClient.SUserCMD.ButtonID.IN_NOATTACK;
            }

            if (ConfigManager.CMisc.NoFlash)
            {
                BasePlayer.FlashMax = 0f;
            }

            if (ConfigManager.CVisualMisc.HitSound && BasePlayer.TotalHitsOnServer != LastHit && BasePlayer.TotalHitsOnServer > 0 && BasePlayer.Health > 0)
            {
                LastHit = BasePlayer.TotalHitsOnServer;

                VEngineClient.ClientCmd("play buttons/arena_switch_press_02");
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Применение тихого угла
        /// </summary>
        /// <param name="Angle">Угол</param>
        private void SetViewAngelSilent(Vector3 Angle)
        {
            VClient.CurrentSequenceNumber = VEngineClient.CurrentSequenceNumber;

            VEngineClient.SetSendPacket(0);

            while (Base.LocalPlayer.CheckSilent(VClient.CurrentSequenceNumber))
            {
                Thread.Yield();
            }

            VClient.SUserCMD oldUserCmd = VClient.UserCmd;

            Angle = Angle.ClampAngle();
            Angle = Angle.NormalizeAngle();

            oldUserCmd.m_vecViewAngles = Angle;
            oldUserCmd.m_iButtons     |= VClient.SUserCMD.ButtonID.IN_ATTACK;

            VClient.UserCmd = oldUserCmd;

            VEngineClient.SetSendPacket(1);
        }