Fix for bail breaking is_user_bot - amb914

This still doesn't cache since that proved to be buggy; this will check the flag first, and then auth second.
This commit is contained in:
Steve Dudenhoeffer 2007-09-06 16:37:57 +00:00
parent bd3b7fc70c
commit dd55716f15

View File

@ -130,7 +130,18 @@ public:
inline bool IsBot() inline bool IsBot()
{ {
return ((pEdict->v.flags & FL_FAKECLIENT) == FL_FAKECLIENT); if ((pEdict->v.flags & FL_FAKECLIENT) == FL_FAKECLIENT)
{
return true;
}
const char *auth = GETPLAYERAUTHID(pEdict);
if (auth && (strcmp(auth, "BOT") == 0))
{
return true;
}
return false;
} }
inline bool IsAlive() inline bool IsAlive()