Skip to content

Commit

Permalink
Remove now unnecessary workaround to stop mouse movement on the pause…
Browse files Browse the repository at this point in the history
… menu from changing in-game angles when unpausing
  • Loading branch information
SamVanheer committed Aug 15, 2023
1 parent 2d35ca7 commit 0285a6e
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 17 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
6 changes: 0 additions & 6 deletions cl_dll/cdll_int.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}

Expand Down
11 changes: 0 additions & 11 deletions cl_dll/inputw32.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 0285a6e

Please sign in to comment.