Skip to content
This repository was archived by the owner on Jan 15, 2021. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down Expand Up @@ -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<CGame**>(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<void**>(3);
Expand All @@ -337,7 +342,7 @@ DWORD WINAPI InitializeHook(void* arguments) {
// B8").count(1).get(0).extract<FileManager*>(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\\";
Expand Down