From f7cf854c362eab8b9d90a7902ea030b8821a6f7d Mon Sep 17 00:00:00 2001 From: def Date: Thu, 24 Sep 2020 09:57:23 +0200 Subject: [PATCH] Make sure turning dyncam off in settings works Even if players have cl_mouse_followfactor turned on Alternative fix for #2761 since players keep reporting confusion about this --- src/game/client/components/menus_settings.cpp | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/game/client/components/menus_settings.cpp b/src/game/client/components/menus_settings.cpp index dab56f1db..f76ee62d3 100644 --- a/src/game/client/components/menus_settings.cpp +++ b/src/game/client/components/menus_settings.cpp @@ -90,8 +90,19 @@ void CMenus::RenderSettingsGeneral(CUIRect MainView) // dynamic camera Left.HSplitTop(20.0f, &Button, &Left); - if(DoButton_CheckBox(&g_Config.m_ClDyncam, Localize("Dynamic Camera"), g_Config.m_ClDyncam, &Button)) - g_Config.m_ClDyncam ^= 1; + bool IsDyncam = g_Config.m_ClDyncam || g_Config.m_ClMouseFollowfactor > 0; + if(DoButton_CheckBox(&IsDyncam, Localize("Dynamic Camera"), IsDyncam, &Button)) + { + if(IsDyncam) + { + g_Config.m_ClDyncam = 0; + g_Config.m_ClMouseFollowfactor = 0; + } + else + { + g_Config.m_ClDyncam = 1; + } + } // weapon pickup Left.HSplitTop(5.0f, 0, &Left);