1
0

Added SetCustomName() to players.

This commit is contained in:
Howaner
2014-09-02 19:12:35 +02:00
parent dfed6f94ca
commit 1bb4d79412
15 changed files with 124 additions and 41 deletions

View File

@@ -124,13 +124,11 @@ cClientHandle::~cClientHandle()
if (m_Player != NULL)
{
cWorld * World = m_Player->GetWorld();
if (!m_Username.empty() && (World != NULL))
{
// Send the Offline PlayerList packet:
World->BroadcastPlayerListItem(*m_Player, false, this);
}
if (World != NULL)
{
// Send the Offline PlayerList packet:
World->BroadcastPlayerListItem(m_Player->GetTabListName(), false, 0, this);
World->RemovePlayer(m_Player, true); // Must be called before cPlayer::Destroy() as otherwise cChunk tries to delete the player, and then we do it again
m_Player->Destroy();
}
@@ -2371,9 +2369,9 @@ void cClientHandle::SendPlayerAbilities()
void cClientHandle::SendPlayerListItem(const cPlayer & a_Player, bool a_IsOnline)
void cClientHandle::SendPlayerListItem(const AString & a_PlayerName, bool a_IsOnline, short a_Ping)
{
m_Protocol->SendPlayerListItem(a_Player, a_IsOnline);
m_Protocol->SendPlayerListItem(a_PlayerName, a_IsOnline, a_Ping);
}