diff options
Diffstat (limited to 'cheat/gmod/lock_cursor.cpp')
| -rw-r--r-- | cheat/gmod/lock_cursor.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/cheat/gmod/lock_cursor.cpp b/cheat/gmod/lock_cursor.cpp new file mode 100644 index 0000000..477847d --- /dev/null +++ b/cheat/gmod/lock_cursor.cpp @@ -0,0 +1,13 @@ +#include "hooks.hpp" + +void __fastcall hooks::lock_cursor( void* ecx, void* edx ) { + static auto lock_cursor_o = g_gmod.m_surface->get_old_function< decltype( &hooks::lock_cursor ) >( 62 ); + if( g_gmod.m_panic ) return lock_cursor_o( ecx, edx ); + + if( g_settings.menu.open ) { + g_gmod.m_surface( )->UnlockCursor( ); + } + else { + lock_cursor_o( ecx, edx ); + } +}
\ No newline at end of file |
