예제 #1
0
        bool CycleZoom(MouseWheelEventArgs e)
        {
            if (!game.IsKeyDown(KeyBinding.ZoomScrolling))
            {
                return(false);
            }
            LocalPlayer p = game.LocalPlayer;

            if (!p.HacksEnabled || !p.CanAnyHacks || !p.CanUseThirdPersonCamera)
            {
                return(false);
            }

            if (fovIndex == -1)
            {
                fovIndex = game.ZoomFieldOfView;
            }
            fovIndex -= e.DeltaPrecise * 5;
            int max = Options.GetInt(OptionsKey.FieldOfView, 1, 150, 70);

            Utils.Clamp(ref fovIndex, 1, max);

            game.FieldOfView     = (int)fovIndex;
            game.ZoomFieldOfView = (int)fovIndex;
            game.UpdateProjection();
            return(true);
        }
예제 #2
0
        public bool SetFOV(int fov, bool setZoom)
        {
            LocalPlayer p = game.LocalPlayer;

            if (game.Fov == fov)
            {
                return(true);
            }
            if (!p.Hacks.Enabled || !p.Hacks.CanAnyHacks || !p.Hacks.CanUseThirdPersonCamera)
            {
                return(false);
            }

            game.Fov = fov;
            if (setZoom)
            {
                game.ZoomFov = fov;
            }
            game.UpdateProjection();
            return(true);
        }