aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDLL/clientauthhooks.cpp
diff options
context:
space:
mode:
authorBobTheBob9 <for.oliver.kirkham@gmail.com>2022-10-08 02:20:22 +0100
committerBobTheBob9 <for.oliver.kirkham@gmail.com>2022-10-08 02:20:22 +0100
commite4eb21af0dadc333250f9bcadd1b1316435a6fb0 (patch)
tree0464c28f70825d7ba64a31d9c73bf79df8a4feb9 /NorthstarDLL/clientauthhooks.cpp
parentd7d92226bc13710f2387492d893187faf8da738b (diff)
downloadNorthstarLauncher-e4eb21af0dadc333250f9bcadd1b1316435a6fb0.tar.gz
NorthstarLauncher-e4eb21af0dadc333250f9bcadd1b1316435a6fb0.zip
bring up to date with main
Diffstat (limited to 'NorthstarDLL/clientauthhooks.cpp')
-rw-r--r--NorthstarDLL/clientauthhooks.cpp18
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",