mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
Make 'CClient::IsHumanPlayer' inline
This commit is contained in:
parent
b5f68df826
commit
e7d7c47531
@ -14,21 +14,6 @@
|
|||||||
#include "engine/server/server.h"
|
#include "engine/server/server.h"
|
||||||
#include "engine/client/client.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
|
// Purpose: throw away any residual garbage in the channel
|
||||||
//---------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------
|
||||||
@ -46,10 +31,7 @@ void CClient::Clear(void)
|
|||||||
//---------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------
|
||||||
void CClient::VClear(CClient* pClient)
|
void CClient::VClear(CClient* pClient)
|
||||||
{
|
{
|
||||||
#ifndef CLIENT_DLL
|
pClient->Clear();
|
||||||
g_ServerPlayer[pClient->GetUserID()].Reset(); // Reset ServerPlayer slot.
|
|
||||||
#endif // !CLIENT_DLL
|
|
||||||
v_CClient_Clear(pClient);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------
|
||||||
|
@ -90,7 +90,7 @@ public:
|
|||||||
inline bool IsPersistenceAvailable(void) const { return m_nPersistenceState >= PERSISTENCE::PERSISTENCE_AVAILABLE; }
|
inline bool IsPersistenceAvailable(void) const { return m_nPersistenceState >= PERSISTENCE::PERSISTENCE_AVAILABLE; }
|
||||||
inline bool IsPersistenceReady(void) const { return m_nPersistenceState == PERSISTENCE::PERSISTENCE_READY; }
|
inline bool IsPersistenceReady(void) const { return m_nPersistenceState == PERSISTENCE::PERSISTENCE_READY; }
|
||||||
inline bool IsFakeClient(void) const { return m_bFakePlayer; }
|
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 SendNetMsgEx(CNetMessage* pMsg, char bLocal, bool bForceReliable, bool bVoice);
|
||||||
bool Connect(const char* szName, void* pNetChannel, bool bFakePlayer, void* a5, char* szMessage, int nMessageSize);
|
bool Connect(const char* szName, void* pNetChannel, bool bFakePlayer, void* a5, char* szMessage, int nMessageSize);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user