From 90ca9d7a47e053c06e48d0bc90afb58cc4ebd28b Mon Sep 17 00:00:00 2001 From: Nicholas Hastings Date: Mon, 25 Jan 2016 18:28:18 -0500 Subject: [PATCH] Fix SourceTV bot detection on Source SDK 2013 mods and BM:S. See bug 5529. --- core/PlayerManager.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/core/PlayerManager.cpp b/core/PlayerManager.cpp index e32ae447..27301fbe 100644 --- a/core/PlayerManager.cpp +++ b/core/PlayerManager.cpp @@ -683,7 +683,8 @@ void PlayerManager::OnClientPutInServer(edict_t *pEntity, const char *playername int newCount = m_PlayersSinceActive + 1; int userId = GetPlayerUserId(pEntity); -#if (SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_HL2DM || SOURCE_ENGINE == SE_DODS || SOURCE_ENGINE == SE_TF2 || SOURCE_ENGINE == SE_NUCLEARDAWN || SOURCE_ENGINE == SE_LEFT4DEAD2) +#if (SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_HL2DM || SOURCE_ENGINE == SE_DODS || SOURCE_ENGINE == SE_TF2 || SOURCE_ENGINE == SE_SDK2013 \ + || SOURCE_ENGINE == SE_BMS || SOURCE_ENGINE == SE_NUCLEARDAWN || SOURCE_ENGINE == SE_LEFT4DEAD2) static ConVar *tv_name = icvar->FindVar("tv_name"); #endif #if SOURCE_ENGINE == SE_TF2 @@ -708,7 +709,8 @@ void PlayerManager::OnClientPutInServer(edict_t *pEntity, const char *playername && (m_SourceTVUserId == userId #if SOURCE_ENGINE == SE_CSGO || strcmp(playername, "GOTV") == 0 -#elif (SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_HL2DM || SOURCE_ENGINE == SE_DODS || SOURCE_ENGINE == SE_TF2 || SOURCE_ENGINE == SE_NUCLEARDAWN) +#elif (SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_HL2DM || SOURCE_ENGINE == SE_DODS || SOURCE_ENGINE == SE_TF2 || SOURCE_ENGINE == SE_SDK2013 \ + || SOURCE_ENGINE == SE_BMS || SOURCE_ENGINE == SE_NUCLEARDAWN || SOURCE_ENGINE == SE_LEFT4DEAD2) || (tv_name && strcmp(playername, tv_name->GetString()) == 0) || (tv_name && tv_name->GetString()[0] == 0 && strcmp(playername, "unnamed") == 0) #else || strcmp(playername, "SourceTV") == 0