From b8e5a4883b0476b0e27e1e3edd5f5432723614f6 Mon Sep 17 00:00:00 2001 From: BobTheBob9 Date: Sun, 8 Jan 2023 02:27:12 +0000 Subject: fix early destruction of actual playerdata --- NorthstarDLL/server/auth/serverauthentication.cpp | 3 ++- NorthstarDLL/server/bots.cpp | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) 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()!"); diff --git a/NorthstarDLL/server/bots.cpp b/NorthstarDLL/server/bots.cpp index 68473d68..2e1b4ea5 100644 --- a/NorthstarDLL/server/bots.cpp +++ b/NorthstarDLL/server/bots.cpp @@ -83,6 +83,8 @@ const std::vector BOT_NAMES = { "Botmos", "Botscuit", "Botty_RaVen", + + "deez_bots", // this is really funny ok }; // this is the root func from what usercmd running is called from -- cgit v1.2.3