From 0285a6ed49691ca22d0a1e2534545c0f54f68e99 Mon Sep 17 00:00:00 2001 From: Sam V Date: Tue, 15 Aug 2023 16:35:40 +0200 Subject: [PATCH] Remove now unnecessary workaround to stop mouse movement on the pause menu from changing in-game angles when unpausing --- CHANGELOG.md | 1 + cl_dll/cdll_int.cpp | 6 ------ cl_dll/inputw32.cpp | 11 ----------- 3 files changed, 1 insertion(+), 17 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d8b9e03e2..98e86ed4a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ * Fixed hand grenade animations not playing correctly [#209](https://github.com/SamVanheer/halflife-updated/pull/209) (Thanks Toodles2You) * Fixed out of bounds access in studiomodel renderer bone setup code (halflife issue [#3360](https://github.com/ValveSoftware/halflife/issues/3360)) * Fixed mouse cursor being invisible in VGUI1 menus when raw input is enabled [#211](https://github.com/SamVanheer/halflife-updated/issues/211) (Thanks RykahKnight) +* Removed now unnecessary workaround to stop mouse movement on the pause menu from changing in-game angles when unpausing ### Features diff --git a/cl_dll/cdll_int.cpp b/cl_dll/cdll_int.cpp index 6b4dbbd00..8fc2ca3ad 100644 --- a/cl_dll/cdll_int.cpp +++ b/cl_dll/cdll_int.cpp @@ -36,8 +36,6 @@ #include "vgui_TeamFortressViewport.h" #include "filesystem_utils.h" -extern bool g_ResetMousePosition; - cl_enginefunc_t gEngfuncs; CHud gHUD; TeamFortressViewport* gViewPort = NULL; @@ -151,10 +149,6 @@ int DLLEXPORT HUD_VidInit() VGui_Startup(); - // Reset mouse position the first time the engine asks for an update so - // movement during map load doesn't impact in-game angles. - g_ResetMousePosition = true; - return 1; } diff --git a/cl_dll/inputw32.cpp b/cl_dll/inputw32.cpp index ad37f41f7..6b4e3a173 100644 --- a/cl_dll/inputw32.cpp +++ b/cl_dll/inputw32.cpp @@ -36,11 +36,6 @@ // Set this to 1 to show mouse cursor. Experimental bool g_iVisibleMouse = false; -/** -* @brief Tells the input code to reset the mouse position to center. -*/ -bool g_ResetMousePosition = false; - extern cl_enginefunc_t gEngfuncs; extern bool iMouseInUse; @@ -1081,12 +1076,6 @@ IN_Move */ void IN_Move(float frametime, usercmd_t* cmd) { - if (g_ResetMousePosition) - { - IN_ResetMouse(); - g_ResetMousePosition = false; - } - if (!iMouseInUse && mouseactive) { IN_MouseMove(frametime, cmd);