From 58f13e887c15e9506c52f5c553b1bd0f6f0cd172 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Fri, 13 Aug 2004 10:46:13 +0000 Subject: [PATCH] Fixed a bug noted by mahnsawce --- amxmodx/CMisc.h | 3 +-- amxmodx/modules.cpp | 2 ++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/amxmodx/CMisc.h b/amxmodx/CMisc.h index d55c439b..b4b28ccc 100755 --- a/amxmodx/CMisc.h +++ b/amxmodx/CMisc.h @@ -110,8 +110,7 @@ public: bool Connect(const char* connectname,const char* ipaddress); inline bool IsBot(){ - const char* auth= (*g_engfuncs.pfnGetPlayerAuthId)(pEdict); - return ( auth && !strcmp( auth , "BOT" ) ); + return ((pEdict->v.flags & FL_FAKECLIENT)?true:false); } inline bool IsAlive(){ diff --git a/amxmodx/modules.cpp b/amxmodx/modules.cpp index e3503607..578b67e8 100755 --- a/amxmodx/modules.cpp +++ b/amxmodx/modules.cpp @@ -628,6 +628,8 @@ const char *MNF_GetAmxScriptName(int id) while (iter && id--) ++iter; + if ((*iter) == NULL) + return NULL; return (*iter).getName(); }