mirror of
https://github.com/alliedmodders/amxmodx.git
synced 2024-12-25 06:15:37 +03:00
fixed bug amb46
This commit is contained in:
parent
de530e2ca3
commit
b90bc3a3e4
@ -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;
|
||||
|
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user