summaryrefslogtreecommitdiffstats
path: root/src/Entities/Player.cpp
diff options
context:
space:
mode:
authorHowaner <franzi.moos@googlemail.com>2014-09-26 17:37:19 +0200
committerHowaner <franzi.moos@googlemail.com>2014-09-26 17:37:19 +0200
commitd83d6456e8aedf84dcda89eb29d20d8ba834748e (patch)
tree0f1b4b04adc925c425df1728e6efc8a4ccbfbfc8 /src/Entities/Player.cpp
parentAdded type checking to map loading. (diff)
downloadcuberite-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.cpp7
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());
}