diff options
author | Mattes D <github@xoft.cz> | 2014-09-26 23:01:22 +0200 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2014-09-26 23:01:22 +0200 |
commit | 305778f22f00384a7e4228990971e50240040acf (patch) | |
tree | d485462b555c767a13dec9ad0c35d20597546490 /src/Entities | |
parent | Fixed UNUSED macro so that it doesn't require type knowledge. (diff) | |
parent | Merge branch 'master' into Fixes (diff) | |
download | cuberite-305778f22f00384a7e4228990971e50240040acf.tar cuberite-305778f22f00384a7e4228990971e50240040acf.tar.gz cuberite-305778f22f00384a7e4228990971e50240040acf.tar.bz2 cuberite-305778f22f00384a7e4228990971e50240040acf.tar.lz cuberite-305778f22f00384a7e4228990971e50240040acf.tar.xz cuberite-305778f22f00384a7e4228990971e50240040acf.tar.zst cuberite-305778f22f00384a7e4228990971e50240040acf.zip |
Diffstat (limited to 'src/Entities')
-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 a8a4061a6..66da14c0c 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()); } |