From 7ccb819f867493f8ec202ea3b39c94c198c64584 Mon Sep 17 00:00:00 2001 From: JustSomePwner Date: Thu, 30 Aug 2018 14:01:54 +0200 Subject: first --- gmod/lock_cursor.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 gmod/lock_cursor.cpp (limited to 'gmod/lock_cursor.cpp') diff --git a/gmod/lock_cursor.cpp b/gmod/lock_cursor.cpp new file mode 100644 index 0000000..477847d --- /dev/null +++ b/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 -- cgit v1.2.3