summaryrefslogtreecommitdiffstats
path: root/src/Protocol/Protocol132.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Protocol/Protocol132.cpp')
-rw-r--r--src/Protocol/Protocol132.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/Protocol/Protocol132.cpp b/src/Protocol/Protocol132.cpp
index 5c58ab0ba..63a15c082 100644
--- a/src/Protocol/Protocol132.cpp
+++ b/src/Protocol/Protocol132.cpp
@@ -176,7 +176,7 @@ void cProtocol132::SendChunkData(int a_ChunkX, int a_ChunkZ, cChunkDataSerialize
// Pre-chunk not used in 1.3.2. Finally.
// Send the chunk data:
- AString Serialized = a_Serializer.Serialize(cChunkDataSerializer::RELEASE_1_3_2);
+ AString Serialized = a_Serializer.Serialize(cChunkDataSerializer::RELEASE_1_3_2, a_ChunkX, a_ChunkZ);
WriteByte(PACKET_CHUNK_DATA);
WriteInt (a_ChunkX);
WriteInt (a_ChunkZ);
@@ -260,7 +260,14 @@ void cProtocol132::SendPlayerSpawn(const cPlayer & a_Player)
cCSLock Lock(m_CSPacket);
WriteByte (PACKET_PLAYER_SPAWN);
WriteInt (a_Player.GetUniqueID());
- WriteString(a_Player.GetName());
+ if (a_Player.HasCustomName())
+ {
+ WriteString(a_Player.GetCustomName());
+ }
+ else
+ {
+ WriteString(a_Player.GetName());
+ }
WriteInt ((int)(a_Player.GetPosX() * 32));
WriteInt ((int)(a_Player.GetPosY() * 32));
WriteInt ((int)(a_Player.GetPosZ() * 32));