86f9be5714
Added new player natives Fixed floatround returning a float instead of an int Added new float.inc file Added OnClientSettingsChanged forward --HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%40247
45 lines
746 B
C++
45 lines
746 B
C++
#include "CPlayer.h"
|
|
|
|
CPlayer::CPlayer()
|
|
{
|
|
m_IsConnected = false;
|
|
m_IsInGame = false;
|
|
m_IsAuthorized = false;
|
|
m_PlayerEdict = NULL;
|
|
}
|
|
|
|
void CPlayer::Initialize(const char *name, const char *ip, edict_t *pEntity)
|
|
{
|
|
m_IsConnected = true;
|
|
m_Name.assign(name);
|
|
m_Ip.assign(ip);
|
|
m_PlayerEdict = pEntity;
|
|
}
|
|
|
|
void CPlayer::Connect()
|
|
{
|
|
m_IsInGame = true;
|
|
}
|
|
|
|
void CPlayer::Authorize(const char *steamid)
|
|
{
|
|
m_IsAuthorized = true;
|
|
m_AuthID.assign(steamid);
|
|
}
|
|
|
|
void CPlayer::Disconnect()
|
|
{
|
|
m_IsConnected = false;
|
|
m_IsInGame = false;
|
|
m_IsAuthorized = false;
|
|
m_Name.clear();
|
|
m_Ip.clear();
|
|
m_AuthID.clear();
|
|
m_PlayerEdict = NULL;
|
|
}
|
|
|
|
void CPlayer::SetName(const char *name)
|
|
{
|
|
m_Name.assign(name);
|
|
}
|