fixed bug amb46
This commit is contained in:
		@@ -40,8 +40,6 @@ void CPlayer::Init(edict_t* e, int i)
 | 
				
			|||||||
	pEdict = e;
 | 
						pEdict = e;
 | 
				
			||||||
	initialized = false;
 | 
						initialized = false;
 | 
				
			||||||
	ingame = false;
 | 
						ingame = false;
 | 
				
			||||||
	bot_value = false;
 | 
					 | 
				
			||||||
	bot_cached = false;
 | 
					 | 
				
			||||||
	authorized = false;
 | 
						authorized = false;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	current = 0;
 | 
						current = 0;
 | 
				
			||||||
@@ -89,8 +87,6 @@ void CPlayer::Disconnect()
 | 
				
			|||||||
	}
 | 
						}
 | 
				
			||||||
	queries.clear();
 | 
						queries.clear();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	bot_value = false;
 | 
					 | 
				
			||||||
	bot_cached = false;
 | 
					 | 
				
			||||||
	menu = 0;
 | 
						menu = 0;
 | 
				
			||||||
	newmenu = -1;
 | 
						newmenu = -1;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
@@ -116,8 +112,6 @@ int CPlayer::NextHUDChannel()
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
bool CPlayer::Connect(const char* connectname, const char* ipaddress)
 | 
					bool CPlayer::Connect(const char* connectname, const char* ipaddress)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	bot_value = false;
 | 
					 | 
				
			||||||
	bot_cached = false;
 | 
					 | 
				
			||||||
	name.assign(connectname);
 | 
						name.assign(connectname);
 | 
				
			||||||
	ip.assign(ipaddress);
 | 
						ip.assign(ipaddress);
 | 
				
			||||||
	time = gpGlobals->time;
 | 
						time = gpGlobals->time;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -84,8 +84,6 @@ public:
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	bool initialized;
 | 
						bool initialized;
 | 
				
			||||||
	bool ingame;
 | 
						bool ingame;
 | 
				
			||||||
	bool bot_cached;
 | 
					 | 
				
			||||||
	bool bot_value;
 | 
					 | 
				
			||||||
	bool authorized;
 | 
						bool authorized;
 | 
				
			||||||
	bool vgui;	
 | 
						bool vgui;	
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -132,24 +130,7 @@ public:
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	inline bool IsBot()
 | 
						inline bool IsBot()
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
		if (!bot_cached)
 | 
							return ((pEdict->v.flags & FL_FAKECLIENT) == FL_FAKECLIENT);
 | 
				
			||||||
		{
 | 
					 | 
				
			||||||
			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;
 | 
					 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	inline bool IsAlive()
 | 
						inline bool IsAlive()
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user