summaryrefslogtreecommitdiffstats
path: root/src/Entities
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2014-09-26 23:01:22 +0200
committerMattes D <github@xoft.cz>2014-09-26 23:01:22 +0200
commit305778f22f00384a7e4228990971e50240040acf (patch)
treed485462b555c767a13dec9ad0c35d20597546490 /src/Entities
parentFixed UNUSED macro so that it doesn't require type knowledge. (diff)
parentMerge branch 'master' into Fixes (diff)
downloadcuberite-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 '')
-rw-r--r--src/Entities/Player.cpp7
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());
}