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 | |
parent | b78f7dc3f9b277c22843cc289346fc68b29fc087 (diff) | |
download | NorthstarLauncher-experimental-bots-pr.tar.gz NorthstarLauncher-experimental-bots-pr.zip |
fix early destruction of actual playerdataexperimental-bots-pr
-rw-r--r-- | NorthstarDLL/server/auth/serverauthentication.cpp | 3 | ||||
-rw-r--r-- | NorthstarDLL/server/bots.cpp | 2 |
2 files changed, 4 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()!"); 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<const char*> 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
|