Skip to content

Commit

Permalink
Update game_go.h
Browse files Browse the repository at this point in the history
  • Loading branch information
anzz1 authored Aug 17, 2023
1 parent 9f55b86 commit 067fbf5
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions include/game_go.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,7 @@ HMODULE __stdcall go_hk_LoadLibraryA(LPCSTR lpLibFileName) {
}

__forceinline static void go_hook_gs() {
HMODULE mod = GetModuleHandleA("cshell.dll");
if (mod)
go_hook_mod(mod);
HMODULE mod;

if (oLoadLibraryA)
detour_iat_func(0, "LoadLibraryA", (void*)go_hk_LoadLibraryA, "kernel32.dll", 0, FALSE);
Expand All @@ -54,6 +52,14 @@ __forceinline static void go_hook_gs() {
else
oLoadLibraryA = (LoadLibraryA_fn)detour_iat_func(mod, "LoadLibraryA", (void*)go_hk_LoadLibraryA, "kernel32.dll", 0, FALSE);
}

mod = GetModuleHandleA("cshell.dll");
if (mod)
go_hook_mod(mod);

mod = GetModuleHandleA("object.lto");
if (mod)
go_hook_mod(mod);
}

// Allow multiple instances (f.ex. dedicated server & game at the same time)
Expand Down

0 comments on commit 067fbf5

Please sign in to comment.