diff options
author | BobTheBob9 <for.oliver.kirkham@gmail.com> | 2023-01-08 02:27:12 +0000 |
---|---|---|
committer | BobTheBob9 <for.oliver.kirkham@gmail.com> | 2023-01-08 02:27:12 +0000 |
commit | b8e5a4883b0476b0e27e1e3edd5f5432723614f6 (patch) | |
tree | 0645bb67c329586a679c5eb2443ae06fb2574a48 /NorthstarDLL/server/auth | |
parent | b78f7dc3f9b277c22843cc289346fc68b29fc087 (diff) | |
download | NorthstarLauncher-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.cpp | 3 |
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()!"); |