From b90bc3a3e4bab500879777dc50a21bcd7f5f677a Mon Sep 17 00:00:00 2001 From: David Anderson Date: Mon, 16 Apr 2007 17:11:40 +0000 Subject: [PATCH] fixed bug amb46 --- amxmodx/CMisc.cpp | 6 ------ amxmodx/CMisc.h | 21 +-------------------- 2 files changed, 1 insertion(+), 26 deletions(-) diff --git a/amxmodx/CMisc.cpp b/amxmodx/CMisc.cpp index e91a1ef9..b5a1021d 100755 --- a/amxmodx/CMisc.cpp +++ b/amxmodx/CMisc.cpp @@ -40,8 +40,6 @@ void CPlayer::Init(edict_t* e, int i) pEdict = e; initialized = false; ingame = false; - bot_value = false; - bot_cached = false; authorized = false; current = 0; @@ -89,8 +87,6 @@ void CPlayer::Disconnect() } queries.clear(); - bot_value = false; - bot_cached = false; menu = 0; newmenu = -1; } @@ -116,8 +112,6 @@ int CPlayer::NextHUDChannel() bool CPlayer::Connect(const char* connectname, const char* ipaddress) { - bot_value = false; - bot_cached = false; name.assign(connectname); ip.assign(ipaddress); time = gpGlobals->time; diff --git a/amxmodx/CMisc.h b/amxmodx/CMisc.h index b9dbe3a0..7a72e16d 100755 --- a/amxmodx/CMisc.h +++ b/amxmodx/CMisc.h @@ -84,8 +84,6 @@ public: bool initialized; bool ingame; - bool bot_cached; - bool bot_value; bool authorized; bool vgui; @@ -132,24 +130,7 @@ public: inline bool IsBot() { - if (!bot_cached) - { - bot_value = false; - if (pEdict->v.flags & FL_FAKECLIENT) - { - bot_value = true; - bot_cached = true; - } else { - const char *auth = GETPLAYERAUTHID(pEdict); - if (auth && (strcmp(auth, "BOT") == 0)) - { - bot_value = true; - bot_cached = true; - } - } - } - - return bot_value; + return ((pEdict->v.flags & FL_FAKECLIENT) == FL_FAKECLIENT); } inline bool IsAlive()