diff --git a/main.cc b/main.cc index d679c2e..88135fd 100644 --- a/main.cc +++ b/main.cc @@ -212,6 +212,11 @@ bool OnViewportInputDebugAlwaysHook(void* thisptr, input_action = IACT_Press; } + if (input_key == IK_Backslash && input_action == IACT_Release) { + input_key = IK_Tilde; + input_action = IACT_Press; + } + return OnViewportInputDebugConsole(*global_debug_console, viewport, input_key, input_action, tick); } @@ -308,12 +313,12 @@ DWORD WINAPI InitializeHook(void* arguments) { hook::set_base(); HookFunction::RunAll(); - global_game = hook::pattern("48 8B 05 ? ? ? ? 48 8D 4C 24 ? C6 44 24") + global_game = hook::pattern("48 8B 05 ? ? ? 01 C6 44 24 30 01 89 4C 24 28") .count(1) .get(0) .extract(3); global_debug_console = - hook::pattern("48 89 05 ? ? ? ? EB 07 48 89 35 ? ? ? ? 48 8B 97") + hook::pattern("48 89 05 ? ? ? ? EB 07 48 89 35 ? ? ? ? 48 8B") .count(1) .get(0) .extract(3); @@ -337,7 +342,7 @@ DWORD WINAPI InitializeHook(void* arguments) { // B8").count(1).get(0).extract(3); game_hook = new utils::VtableHook(*global_game); - game_hook->HookMethod(OnViewportInputDebugAlwaysHook, 133); + game_hook->HookMethod(OnViewportInputDebugAlwaysHook, 136); // auto exe_path = GetExecutablePath(); // exe_path += L"\\scriptplugins\\";