aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDLL/server/auth
diff options
context:
space:
mode:
authorBobTheBob9 <for.oliver.kirkham@gmail.com>2023-01-08 02:27:12 +0000
committerBobTheBob9 <for.oliver.kirkham@gmail.com>2023-01-08 02:27:12 +0000
commitb8e5a4883b0476b0e27e1e3edd5f5432723614f6 (patch)
tree0645bb67c329586a679c5eb2443ae06fb2574a48 /NorthstarDLL/server/auth
parentb78f7dc3f9b277c22843cc289346fc68b29fc087 (diff)
downloadNorthstarLauncher-experimental-bots-pr.tar.gz
NorthstarLauncher-experimental-bots-pr.zip
fix early destruction of actual playerdataexperimental-bots-pr
Diffstat (limited to 'NorthstarDLL/server/auth')
-rw-r--r--NorthstarDLL/server/auth/serverauthentication.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/NorthstarDLL/server/auth/serverauthentication.cpp b/NorthstarDLL/server/auth/serverauthentication.cpp
index 7b3f7436..fea4e7cb 100644
--- a/NorthstarDLL/server/auth/serverauthentication.cpp
+++ b/NorthstarDLL/server/auth/serverauthentication.cpp
@@ -406,7 +406,8 @@ AUTOHOOK(CBaseClient__Clear, engine.dll + 0x101480,
{
// final cleanup, humans should never hit this without being disconnected already!
// bots generally will on level change, however, so this is necessary
- if (g_pServerAuthentication->m_PlayerAuthenticationData.find(self) != g_pServerAuthentication->m_PlayerAuthenticationData.end())
+ if (self->m_Signon >= R2::eSignonState::CONNECTED &&
+ g_pServerAuthentication->m_PlayerAuthenticationData.find(self) != g_pServerAuthentication->m_PlayerAuthenticationData.end())
{
if (!self->m_bFakePlayer)
spdlog::warn("player {} has auth data in CBaseClient::Clear()!");