aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDedicatedTest
diff options
context:
space:
mode:
authorBobTheBob <32057864+BobTheBob9@users.noreply.github.com>2021-09-09 23:52:24 +0100
committerBobTheBob <32057864+BobTheBob9@users.noreply.github.com>2021-09-09 23:52:24 +0100
commitf083706eb05a22ec166d8e29b565f93785ad3cb0 (patch)
tree47d362b5d10258bec334fcd0e62dcb51eb2b20ab /NorthstarDedicatedTest
parentfc0e6630fb6dccbeeca6ea65c061824cd7a848e1 (diff)
downloadNorthstarLauncher-f083706eb05a22ec166d8e29b565f93785ad3cb0.tar.gz
NorthstarLauncher-f083706eb05a22ec166d8e29b565f93785ad3cb0.zip
fix singleplayer auth issues
Diffstat (limited to 'NorthstarDedicatedTest')
-rw-r--r--NorthstarDedicatedTest/masterserver.h3
-rw-r--r--NorthstarDedicatedTest/serverauthentication.cpp2
2 files changed, 3 insertions, 2 deletions
diff --git a/NorthstarDedicatedTest/masterserver.h b/NorthstarDedicatedTest/masterserver.h
index a5fba5aa..d7dcf485 100644
--- a/NorthstarDedicatedTest/masterserver.h
+++ b/NorthstarDedicatedTest/masterserver.h
@@ -38,11 +38,12 @@ private:
bool m_requestingServerList = false;
bool m_authenticatingWithGameServer = false;
bool m_savingPersistentData = false;
- bool m_bRequireClientAuth = false;
public:
char m_ownServerId[33];
+ bool m_bRequireClientAuth = false;
+
bool m_scriptRequestingServerList = false;
bool m_successfullyConnected = true;
diff --git a/NorthstarDedicatedTest/serverauthentication.cpp b/NorthstarDedicatedTest/serverauthentication.cpp
index ea9c4054..fed4eb82 100644
--- a/NorthstarDedicatedTest/serverauthentication.cpp
+++ b/NorthstarDedicatedTest/serverauthentication.cpp
@@ -214,7 +214,7 @@ char CBaseClient__ConnectHook(void* self, char* name, __int64 netchan_ptr_arg, c
char ret = CBaseClient__Connect(self, name, netchan_ptr_arg, b_fake_player_arg, a5, Buffer, a7);
if (strlen(name) >= 64) // fix for name overflow bug
CBaseClient__Disconnect(self, 1, "Invalid name");
- else if (!g_ServerAuthenticationManager->AuthenticatePlayer(self, nextPlayerUid, nextPlayerToken))
+ else if (!g_ServerAuthenticationManager->AuthenticatePlayer(self, nextPlayerUid, nextPlayerToken) && g_MasterServerManager->m_bRequireClientAuth)
CBaseClient__Disconnect(self, 1, "Authentication Failed");
if (!g_ServerAuthenticationManager->m_additionalPlayerData.count(self))