Make 'CClient::IsHumanPlayer' inline

This commit is contained in:
Kawe Mazidjatari 2023-07-17 17:38:21 +02:00
parent b5f68df826
commit e7d7c47531
2 changed files with 2 additions and 20 deletions

View File

@ -14,21 +14,6 @@
#include "engine/server/server.h"
#include "engine/client/client.h"
//---------------------------------------------------------------------------------
// Purpose: checks if this client is an actual human player
// Output : true if human, false otherwise
//---------------------------------------------------------------------------------
bool CClient::IsHumanPlayer(void) const
{
if (!IsConnected())
return false;
if (IsFakeClient())
return false;
return true;
}
//---------------------------------------------------------------------------------
// Purpose: throw away any residual garbage in the channel
//---------------------------------------------------------------------------------
@ -46,10 +31,7 @@ void CClient::Clear(void)
//---------------------------------------------------------------------------------
void CClient::VClear(CClient* pClient)
{
#ifndef CLIENT_DLL
g_ServerPlayer[pClient->GetUserID()].Reset(); // Reset ServerPlayer slot.
#endif // !CLIENT_DLL
v_CClient_Clear(pClient);
pClient->Clear();
}
//---------------------------------------------------------------------------------

View File

@ -90,7 +90,7 @@ public:
inline bool IsPersistenceAvailable(void) const { return m_nPersistenceState >= PERSISTENCE::PERSISTENCE_AVAILABLE; }
inline bool IsPersistenceReady(void) const { return m_nPersistenceState == PERSISTENCE::PERSISTENCE_READY; }
inline bool IsFakeClient(void) const { return m_bFakePlayer; }
bool IsHumanPlayer(void) const;
inline bool IsHumanPlayer(void) const { if (!IsConnected() || IsFakeClient()) { return false; } return true; }
bool SendNetMsgEx(CNetMessage* pMsg, char bLocal, bool bForceReliable, bool bVoice);
bool Connect(const char* szName, void* pNetChannel, bool bFakePlayer, void* a5, char* szMessage, int nMessageSize);