Skip to content

Commit

Permalink
Remove AUTOHOOK_INIT and AUTOHOOK_DISPATCH
Browse files Browse the repository at this point in the history
  • Loading branch information
ASpoonPlaysGames committed Aug 29, 2024
1 parent 1854482 commit ee9d370
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions primedev/client/rejectconnectionfixes.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#include "engine/r2engine.h"

AUTOHOOK_INIT()

// this is called from when our connection is rejected, this is the only case we're hooking this for
static void (*o_pCOM_ExplainDisconnection)(bool a1, const char* fmt, ...) = nullptr;
static void h_COM_ExplainDisconnection(bool a1, const char* fmt, ...)
Expand All @@ -28,7 +26,6 @@ static void h_COM_ExplainDisconnection(bool a1, const char* fmt, ...)

ON_DLL_LOAD_CLIENT("engine.dll", RejectConnectionFixes, (CModule module))
{
AUTOHOOK_DISPATCH()
o_pCOM_ExplainDisconnection = module.Offset(0x1342F0).RCast<decltype(o_pCOM_ExplainDisconnection)>();
HookAttach(&(PVOID&)o_pCOM_ExplainDisconnection, (PVOID)h_COM_ExplainDisconnection);
}

0 comments on commit ee9d370

Please sign in to comment.