diff options
Diffstat (limited to 'primedev')
-rw-r--r-- | primedev/engine/runframe.cpp | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/primedev/engine/runframe.cpp b/primedev/engine/runframe.cpp index ddfd9253..bfec9b8f 100644 --- a/primedev/engine/runframe.cpp +++ b/primedev/engine/runframe.cpp @@ -3,17 +3,14 @@ #include "hoststate.h" #include "server/serverpresence.h" -AUTOHOOK_INIT() - -// clang-format off -AUTOHOOK(CEngine__Frame, engine.dll + 0x1C8650, -void, __fastcall, (CEngine* self)) -// clang-format on +static void(__fastcall* o_pCEngine__Frame)(CEngine* self) = nullptr; +static void __fastcall h_CEngine__Frame(CEngine* self) { - CEngine__Frame(self); + o_pCEngine__Frame(self); } ON_DLL_LOAD("engine.dll", RunFrame, (CModule module)) { - AUTOHOOK_DISPATCH() + o_pCEngine__Frame = module.Offset(0x1C8650).RCast<decltype(o_pCEngine__Frame)>(); + HookAttach(&(PVOID&)o_pCEngine__Frame, (PVOID)h_CEngine__Frame); } |