diff options
author | Howaner <franzi.moos@googlemail.com> | 2014-09-26 17:37:19 +0200 |
---|---|---|
committer | Howaner <franzi.moos@googlemail.com> | 2014-09-26 17:37:19 +0200 |
commit | d83d6456e8aedf84dcda89eb29d20d8ba834748e (patch) | |
tree | 0f1b4b04adc925c425df1728e6efc8a4ccbfbfc8 /src/Entities/Player.cpp | |
parent | Added type checking to map loading. (diff) | |
download | cuberite-d83d6456e8aedf84dcda89eb29d20d8ba834748e.tar cuberite-d83d6456e8aedf84dcda89eb29d20d8ba834748e.tar.gz cuberite-d83d6456e8aedf84dcda89eb29d20d8ba834748e.tar.bz2 cuberite-d83d6456e8aedf84dcda89eb29d20d8ba834748e.tar.lz cuberite-d83d6456e8aedf84dcda89eb29d20d8ba834748e.tar.xz cuberite-d83d6456e8aedf84dcda89eb29d20d8ba834748e.tar.zst cuberite-d83d6456e8aedf84dcda89eb29d20d8ba834748e.zip |
Diffstat (limited to 'src/Entities/Player.cpp')
-rw-r--r-- | src/Entities/Player.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/Entities/Player.cpp b/src/Entities/Player.cpp index 1bdb752c5..6875506ea 100644 --- a/src/Entities/Player.cpp +++ b/src/Entities/Player.cpp @@ -816,7 +816,8 @@ void cPlayer::SetCustomName(const AString & a_CustomName) { return; } - AString OldCustomName = m_CustomName; + + m_World->BroadcastPlayerListRemovePlayer(*this); m_CustomName = a_CustomName; if (m_CustomName.length() > 16) @@ -824,8 +825,8 @@ void cPlayer::SetCustomName(const AString & a_CustomName) m_CustomName = m_CustomName.substr(0, 16); } - m_World->BroadcastPlayerListUpdateDisplayName(*this, m_CustomName); - m_World->BroadcastSpawnEntity(*this, m_ClientHandle); + m_World->BroadcastPlayerListAddPlayer(*this); + m_World->BroadcastSpawnEntity(*this, GetClientHandle()); } |