aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDLL/client
diff options
context:
space:
mode:
Diffstat (limited to 'NorthstarDLL/client')
-rw-r--r--NorthstarDLL/client/clientauthhooks.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/NorthstarDLL/client/clientauthhooks.cpp b/NorthstarDLL/client/clientauthhooks.cpp
index e66da6c8..adb2ab22 100644
--- a/NorthstarDLL/client/clientauthhooks.cpp
+++ b/NorthstarDLL/client/clientauthhooks.cpp
@@ -1,6 +1,7 @@
#include "masterserver/masterserver.h"
#include "core/convar/convar.h"
#include "client/r2client.h"
+#include "core/vanilla.h"
AUTOHOOK_INIT()
@@ -16,6 +17,14 @@ AUTOHOOK(AuthWithStryder, engine.dll + 0x1843A0,
void, __fastcall, (void* a1))
// clang-format on
{
+ // don't attempt to do Atlas auth if we are in vanilla compatibility mode
+ // this prevents users from joining untrustworthy servers (unless they use a concommand or something)
+ if (g_pVanillaCompatibility->GetVanillaCompatibility())
+ {
+ AuthWithStryder(a1);
+ return;
+ }
+
// game will call this forever, until it gets a valid auth key
// so, we need to manually invalidate our key until we're authed with northstar, then we'll allow game to auth with stryder
if (!g_pMasterServerManager->m_bOriginAuthWithMasterServerDone && Cvar_ns_has_agreed_to_send_token->GetInt() != DISAGREED_TO_SEND_TOKEN)
@@ -39,7 +48,7 @@ AUTOHOOK(Auth3PToken, engine.dll + 0x183760,
char*, __fastcall, ())
// clang-format on
{
- if (g_pMasterServerManager->m_sOwnClientAuthToken[0])
+ if (!g_pVanillaCompatibility->GetVanillaCompatibility() && g_pMasterServerManager->m_sOwnClientAuthToken[0])
{
memset(p3PToken, 0x0, 1024);
strcpy(p3PToken, "Protocol 3: Protect the Pilot");