diff options
author | mtilden@gmail.com <mtilden@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2011-12-26 03:35:49 +0100 |
---|---|---|
committer | mtilden@gmail.com <mtilden@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2011-12-26 03:35:49 +0100 |
commit | a85ea1c9accd439bb8a805253979b93e7c8fe6fe (patch) | |
tree | 82630f92662eafe869cbdfabb928c0d6318da991 /source/cPlayer.cpp | |
parent | Made some functions in cChunk and cNoise inline, this should significantly increase chunk generation speed (diff) | |
download | cuberite-a85ea1c9accd439bb8a805253979b93e7c8fe6fe.tar cuberite-a85ea1c9accd439bb8a805253979b93e7c8fe6fe.tar.gz cuberite-a85ea1c9accd439bb8a805253979b93e7c8fe6fe.tar.bz2 cuberite-a85ea1c9accd439bb8a805253979b93e7c8fe6fe.tar.lz cuberite-a85ea1c9accd439bb8a805253979b93e7c8fe6fe.tar.xz cuberite-a85ea1c9accd439bb8a805253979b93e7c8fe6fe.tar.zst cuberite-a85ea1c9accd439bb8a805253979b93e7c8fe6fe.zip |
Diffstat (limited to 'source/cPlayer.cpp')
-rw-r--r-- | source/cPlayer.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
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 );
}
}
|