Skip to content

Commit

Permalink
Update CMisc.h
Browse files Browse the repository at this point in the history
Resolve players being read as bots. alliedmodders#848
  • Loading branch information
djearthquake authored Jun 10, 2022
1 parent 49a8b95 commit 3b63a31
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions amxmodx/CMisc.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,18 +83,8 @@ class CPlayer

inline bool IsBot()
{
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;
const char *auth = GETPLAYERAUTHID(pEdict);
return auth && !strcmp(auth, "BOT");
}

inline bool IsAlive()
Expand Down

0 comments on commit 3b63a31

Please sign in to comment.