From dd7b85dea7a389c35fc7f6639ec94c949aaaf8d1 Mon Sep 17 00:00:00 2001 From: jeefo Date: Sat, 21 Nov 2015 19:17:11 +0300 Subject: [PATCH] possibly fixed autovacate feature trigger build --- include/core.h | 3 +-- source/interface.cpp | 11 ----------- source/manager.cpp | 8 -------- 3 files changed, 1 insertion(+), 21 deletions(-) diff --git a/include/core.h b/include/core.h index 8fc0b20..1ced32f 100644 --- a/include/core.h +++ b/include/core.h @@ -1359,8 +1359,7 @@ public: void Free (void); void Free (int index); - void CheckAutoVacate (void); - + void AddRandom (void) { AddBot ("", -1, -1, -1, -1); } void AddBot (const String &name, int difficulty, int personality, int team, int member); void AddBot (const String &name, const String &difficulty, const String &personality, const String &team, const String &member); diff --git a/source/interface.cpp b/source/interface.cpp index e764b7c..4eecdf3 100644 --- a/source/interface.cpp +++ b/source/interface.cpp @@ -1047,16 +1047,6 @@ void UpdateClientData (const struct edict_s *ent, int sendweapons, struct client (*g_functionTable.pfnUpdateClientData) (ent, sendweapons, cd); } -void ClientPutInServer (edict_t *ent) -{ - bots.CheckAutoVacate (); - - if (g_isMetamod) - RETURN_META (MRES_IGNORED); - - (*g_functionTable.pfnClientPutInServer) (ent); -} - int ClientConnect (edict_t *ent, const char *name, const char *addr, char rejectReason[128]) { // this function is called in order to tell the MOD DLL that a client attempts to connect the @@ -2804,7 +2794,6 @@ export int GetEntityAPI2 (gamefuncs_t *functionTable, int *) functionTable->pfnTouch = Touch; functionTable->pfnClientConnect = ClientConnect; functionTable->pfnClientDisconnect = ClientDisconnect; - functionTable->pfnClientPutInServer = ClientPutInServer; functionTable->pfnClientUserInfoChanged = ClientUserInfoChanged; functionTable->pfnClientCommand = ClientCommand; functionTable->pfnServerActivate = ServerActivate; diff --git a/source/manager.cpp b/source/manager.cpp index d9a5221..e21cc8f 100644 --- a/source/manager.cpp +++ b/source/manager.cpp @@ -336,14 +336,6 @@ void BotManager::AddBot (const String &name, const String &difficulty, const Str yb_quota.SetInt (GetBotsNum () + 1); } -void BotManager::CheckAutoVacate(void) -{ - // this function sets timer to kick one bot off. - - if (yb_autovacate.GetBool ()) - RemoveRandom (); -} - void BotManager::MaintainBotQuota (void) { // this function keeps number of bots up to date, and don't allow to maintain bot creation