From c31d4e69c26deed5e554ef9b0f12b5b21f1ce700 Mon Sep 17 00:00:00 2001 From: Asgard <95163444+AsgardXIV@users.noreply.github.com> Date: Mon, 19 Dec 2022 18:20:54 -0700 Subject: [PATCH] Set sane default FoV --- Dalamud/XAT.Plugin/Cutscene/VirtualCamera.cs | 4 ++-- Dalamud/XAT.Plugin/Game/Hooks/CameraHooks.cs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Dalamud/XAT.Plugin/Cutscene/VirtualCamera.cs b/Dalamud/XAT.Plugin/Cutscene/VirtualCamera.cs index 58f5357..8f7ae1c 100644 --- a/Dalamud/XAT.Plugin/Cutscene/VirtualCamera.cs +++ b/Dalamud/XAT.Plugin/Cutscene/VirtualCamera.cs @@ -5,9 +5,9 @@ namespace XAT.Plugin.Cutscene; public class VirtualCamera { - public record class CameraState(Vector3 Position, Quaternion Rotation, float? FoV); + public record class CameraState(Vector3 Position, Quaternion Rotation, float FoV); public bool IsActive { get; set; } = false; - public CameraState State { get; set; } = new CameraState(Vector3.Zero, Quaternion.Identity, null); + public CameraState State { get; set; } = new CameraState(Vector3.Zero, Quaternion.Identity, 0.78f); } diff --git a/Dalamud/XAT.Plugin/Game/Hooks/CameraHooks.cs b/Dalamud/XAT.Plugin/Game/Hooks/CameraHooks.cs index f166e89..a979d6f 100644 --- a/Dalamud/XAT.Plugin/Game/Hooks/CameraHooks.cs +++ b/Dalamud/XAT.Plugin/Game/Hooks/CameraHooks.cs @@ -34,7 +34,7 @@ public CameraHooks(XATPlugin plugin) private unsafe Matrix4x4* ProjectionDetour(IntPtr ptr, float fov, float aspect, float nearPlane, float farPlane, float a6, float a7) { if (VirtualCamera.IsActive) - fov = VirtualCamera.State.FoV ?? fov; + fov = VirtualCamera.State.FoV; var exec = ProjectionHook.Original(ptr, fov, aspect, nearPlane, farPlane, a6, a7);