From e4eb21af0dadc333250f9bcadd1b1316435a6fb0 Mon Sep 17 00:00:00 2001 From: BobTheBob9 Date: Sat, 8 Oct 2022 02:20:22 +0100 Subject: bring up to date with main --- NorthstarDLL/clientauthhooks.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'NorthstarDLL/clientauthhooks.cpp') diff --git a/NorthstarDLL/clientauthhooks.cpp b/NorthstarDLL/clientauthhooks.cpp index ccd7432e..ef61741e 100644 --- a/NorthstarDLL/clientauthhooks.cpp +++ b/NorthstarDLL/clientauthhooks.cpp @@ -33,10 +33,28 @@ void, __fastcall, (void* a1)) AuthWithStryder(a1); } +char* p3PToken; + +// clang-format off +AUTOHOOK(Auth3PToken, engine.dll + 183760, +char*, __fastcall, ()) +// clang-format on +{ + if (g_pMasterServerManager->m_sOwnClientAuthToken[0]) + { + memset(p3PToken, 0x0, 1024); + strcpy(p3PToken, "Protocol 3: Protect the Pilot"); + } + + return Auth3PToken(); +} + ON_DLL_LOAD_CLIENT_RELIESON("engine.dll", ClientAuthHooks, ConVar, (CModule module)) { AUTOHOOK_DISPATCH() + p3PToken = module.Offset(0x13979D80).As(); + // this cvar will save to cfg once initially agreed with Cvar_ns_has_agreed_to_send_token = new ConVar( "ns_has_agreed_to_send_token", -- cgit v1.2.3