diff options
author | BobTheBob9 <for.oliver.kirkham@gmail.com> | 2022-10-08 02:20:22 +0100 |
---|---|---|
committer | BobTheBob9 <for.oliver.kirkham@gmail.com> | 2022-10-08 02:20:22 +0100 |
commit | e4eb21af0dadc333250f9bcadd1b1316435a6fb0 (patch) | |
tree | 0464c28f70825d7ba64a31d9c73bf79df8a4feb9 /NorthstarDLL/clientauthhooks.cpp | |
parent | d7d92226bc13710f2387492d893187faf8da738b (diff) | |
download | NorthstarLauncher-e4eb21af0dadc333250f9bcadd1b1316435a6fb0.tar.gz NorthstarLauncher-e4eb21af0dadc333250f9bcadd1b1316435a6fb0.zip |
bring up to date with main
Diffstat (limited to 'NorthstarDLL/clientauthhooks.cpp')
-rw-r--r-- | NorthstarDLL/clientauthhooks.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
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<char*>(); + // 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", |