From a85ea1c9accd439bb8a805253979b93e7c8fe6fe Mon Sep 17 00:00:00 2001 From: "mtilden@gmail.com" Date: Mon, 26 Dec 2011 02:35:49 +0000 Subject: - Cleaned up PLI Packet and its creation/sending and fixed bug of player not being removed on scoreboard (forgot to send color in the removal packet) git-svn-id: http://mc-server.googlecode.com/svn/trunk@116 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/cPlayer.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'source/cPlayer.cpp') diff --git a/source/cPlayer.cpp b/source/cPlayer.cpp index fd7a09a6b..e8bdeb4ff 100644 --- a/source/cPlayer.cpp +++ b/source/cPlayer.cpp @@ -239,11 +239,8 @@ void cPlayer::Tick(float a_Dt) for( cWorld::PlayerList::iterator itr = PlayerList.begin(); itr != PlayerList.end(); ++itr ) { if ((*itr) && (*itr)->GetClientHandle() && !((*itr)->GetClientHandle()->IsDestroyed())) { - cPacket_PlayerListItem PlayerList; - PlayerList.m_PlayerName = GetColor() + GetName(); - PlayerList.m_Online = true; - PlayerList.m_Ping = (short)5; - (*itr)->GetClientHandle()->Send( PlayerList ); + cPacket_PlayerListItem *PlayerList = new cPacket_PlayerListItem(GetColor() + GetName(), true, (*itr)->GetClientHandle()->GetPing()); + (*itr)->GetClientHandle()->Send( *PlayerList ); } } -- cgit v1.2.3