Skip to content

Commit

Permalink
Properly fix mouse movement in main menu affecting in-game angles
Browse files Browse the repository at this point in the history
  • Loading branch information
SamVanheer committed Aug 31, 2023
1 parent 473e9ea commit e3ee10f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +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
* Mouse movement in the main menu no longer affects in-game view angles when not using raw input
* Fixed RPG being flagged as unusable while a rocket is loaded [#213](https://github.com/SamVanheer/halflife-updated/pull/213) (Thanks Toodles2You)
* Have clients select weapons by ID, rather than by name [#217](https://github.com/SamVanheer/halflife-updated/pull/217) (Thanks Toodles2You)
* Copy delta.lst when building client or server to ensure mods have correct delta.lst file (Thanks P38TaKjYzY)
Expand Down
5 changes: 5 additions & 0 deletions cl_dll/inputw32.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
#include <SDL2/SDL_mouse.h>
#include <SDL2/SDL_gamecontroller.h>

void IN_ResetMouse();

#define MOUSE_BUTTON_COUNT 5

// Set this to 1 to show mouse cursor. Experimental
Expand Down Expand Up @@ -276,6 +278,9 @@ void DLLEXPORT IN_ActivateMouse()
{
IN_SetMouseRelative(true);
}

// Clear out accumulated mouse input from main menu movement.
IN_ResetMouse();
}


Expand Down

0 comments on commit e3ee10f

Please sign in to comment.