diff options
author | faketruth <faketruth@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-01-02 20:03:19 +0100 |
---|---|---|
committer | faketruth <faketruth@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-01-02 20:03:19 +0100 |
commit | f47c8521864b64a8fd84f05260970d613898e47e (patch) | |
tree | 39f0c332b3cacdf67c4aff828f1b2918e7c80384 /source | |
parent | CreativeInventory Update (diff) | |
download | cuberite-f47c8521864b64a8fd84f05260970d613898e47e.tar cuberite-f47c8521864b64a8fd84f05260970d613898e47e.tar.gz cuberite-f47c8521864b64a8fd84f05260970d613898e47e.tar.bz2 cuberite-f47c8521864b64a8fd84f05260970d613898e47e.tar.lz cuberite-f47c8521864b64a8fd84f05260970d613898e47e.tar.xz cuberite-f47c8521864b64a8fd84f05260970d613898e47e.tar.zst cuberite-f47c8521864b64a8fd84f05260970d613898e47e.zip |
Diffstat (limited to '')
-rw-r--r-- | source/cClientHandle.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source/cClientHandle.cpp b/source/cClientHandle.cpp index 10364243e..891140630 100644 --- a/source/cClientHandle.cpp +++ b/source/cClientHandle.cpp @@ -183,12 +183,14 @@ cClientHandle::~cClientHandle() if( m_LoadedChunks[i] ) m_LoadedChunks[i]->RemoveClient( this );
}
+
cWorld::PlayerList PlayerList = cRoot::Get()->GetWorld()->GetAllPlayers();
for( cWorld::PlayerList::iterator itr = PlayerList.begin(); itr != PlayerList.end(); ++itr )
{
if ((*itr) && (*itr)->GetClientHandle() && strlen(GetUsername()) > 0)
{
- cPacket_PlayerListItem PlayerList(m_Player->GetColor() + GetUsername(), false, (short)9999);
+ std::string NameColor = ( m_Player ? m_Player->GetColor() : "" );
+ cPacket_PlayerListItem PlayerList(NameColor + GetUsername(), false, (short)9999);
(*itr)->GetClientHandle()->Send( PlayerList );
}
|