From f94df06b6601f9dcecd383f5d093d225f41d1c65 Mon Sep 17 00:00:00 2001 From: Howaner Date: Tue, 9 Sep 2014 03:02:25 +0200 Subject: Added the player list to the 1.8 protocol. --- src/ClientHandle.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/ClientHandle.cpp') diff --git a/src/ClientHandle.cpp b/src/ClientHandle.cpp index f24309159..f97ce26c9 100644 --- a/src/ClientHandle.cpp +++ b/src/ClientHandle.cpp @@ -127,7 +127,7 @@ cClientHandle::~cClientHandle() if (!m_Username.empty() && (World != NULL)) { // Send the Offline PlayerList packet: - World->BroadcastPlayerListItem(*m_Player, false, this); + World->BroadcastPlayerListItem(*m_Player, 4, this); } if (World != NULL) { @@ -366,6 +366,10 @@ void cClientHandle::Authenticate(const AString & a_Name, const AString & a_UUID, m_Player->Initialize(*World); m_State = csAuthenticated; + // Send player list items + SendPlayerListItem(*m_Player, 0); + World->SendPlayerList(m_Player); + // Query player team m_Player->UpdateTeam(); @@ -2378,9 +2382,9 @@ void cClientHandle::SendPlayerAbilities() -void cClientHandle::SendPlayerListItem(const cPlayer & a_Player, bool a_IsOnline) +void cClientHandle::SendPlayerListItem(const cPlayer & a_Player, char a_Action) { - m_Protocol->SendPlayerListItem(a_Player, a_IsOnline); + m_Protocol->SendPlayerListItem(a_Player, a_Action); } -- cgit v1.2.3