From 3dd28c156598c2aaa3dc0549e34f1bde4577fca2 Mon Sep 17 00:00:00 2001 From: Skull Merlin <86374920+skkuull@users.noreply.github.com> Date: Sun, 6 Mar 2022 15:03:44 +0200 Subject: [PATCH] fovmin reset fix --- src/client/component/patches.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/client/component/patches.cpp b/src/client/component/patches.cpp index d5392095..f1277e94 100644 --- a/src/client/component/patches.cpp +++ b/src/client/component/patches.cpp @@ -72,7 +72,7 @@ namespace patches void set_client_dvar_from_server_stub(void* a1, void* a2, const char* dvar, const char* value) { - if (dvar == "cg_fov"s) + if (dvar == "cg_fov"s || dvar == "cg_fovMin"s) { return; } @@ -179,7 +179,8 @@ namespace patches // Make cg_fov and cg_fovscale saved dvars dvars::override::register_float("cg_fov", 65.f, 40.f, 200.f, game::DvarFlags::DVAR_FLAG_SAVED); dvars::override::register_float("cg_fovScale", 1.f, 0.1f, 2.f, game::DvarFlags::DVAR_FLAG_SAVED); - + dvars::override::register_float("cg_fovMin", 1.f, 1.0f, 90.f, game::DvarFlags::DVAR_FLAG_SAVED); + // Allow kbam input when gamepad is enabled utils::hook::nop(SELECT_VALUE(0x14018797E, 0x14024EF60), 2); utils::hook::nop(SELECT_VALUE(0x1401856DC, 0x14024C6B0), 6);