Fixed an issue where switching back from PDA would affect in game FOV. Prevented PDA switching from altering FOV for readability.

This commit is contained in:
2025-08-15 10:24:11 +02:00
parent 7cb6a135c7
commit f45e645c75

View File

@@ -13,6 +13,7 @@ const std::string PLUGIN_NAME = "HellIsUs";
const std::string PLUGIN_LOG = PLUGIN_NAME + ".log"; const std::string PLUGIN_LOG = PLUGIN_NAME + ".log";
const std::string gameExecutable = "HellIsUs-Win64-Shipping.exe"; const std::string gameExecutable = "HellIsUs-Win64-Shipping.exe";
const float baseAspect = 1.777777791; const float baseAspect = 1.777777791;
const float PDA_FOV = 21; // FOV must not be modified when switching to PDA to keep reading possible
// Logger // Logger
std::shared_ptr<spdlog::logger> logger; std::shared_ptr<spdlog::logger> logger;
@@ -260,7 +261,9 @@ static void FOVFixEnabled(bool fix_enabled) {
g_Compensated_FOV = ctx.xmm0.f32[0] = Maths::CompensateHorizontalFOV(g_FOV_In, baseAspect, aspectRatio); g_Compensated_FOV = ctx.xmm0.f32[0] = Maths::CompensateHorizontalFOV(g_FOV_In, baseAspect, aspectRatio);
else else
g_Compensated_FOV = ctx.xmm0.f32[0]; g_Compensated_FOV = ctx.xmm0.f32[0];
g_FOV_Out = ctx.xmm0.f32[0] += (g_fov_fix_enabled ? g_AdditionalFOVValue : 0); if (g_FOV_In != PDA_FOV)
g_FOV_Out = ctx.xmm0.f32[0] += (g_fov_fix_enabled ? g_AdditionalFOVValue : 0);
else g_FOV_Out = ctx.xmm0.f32[0];
}); });
} }
else FOVHook.enable(); else FOVHook.enable();