diff options
Diffstat (limited to 'src/Protocol/Protocol17x.cpp')
-rw-r--r-- | src/Protocol/Protocol17x.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/Protocol/Protocol17x.cpp b/src/Protocol/Protocol17x.cpp index dc6a817a3..50c2014c6 100644 --- a/src/Protocol/Protocol17x.cpp +++ b/src/Protocol/Protocol17x.cpp @@ -3015,7 +3015,18 @@ void cProtocol176::SendPlayerSpawn(const cPlayer & a_Player) Pkt.WriteVarInt(a_Player.GetUniqueID()); Pkt.WriteString(a_Player.GetClientHandle()->GetUUID()); Pkt.WriteString(a_Player.GetName()); - Pkt.WriteVarInt(0); // We have no data to send here + + const Json::Value & Properties = m_Client->GetProperties(); + const Json::Value::const_iterator End = Properties.end(); + Pkt.WriteVarInt(Properties.size()); + + for (Json::Value::iterator itr = Properties.begin(); itr != End; ++itr) + { + Pkt.WriteString(((Json::Value)*itr).get("name", "").toStyledString()); + Pkt.WriteString(((Json::Value)*itr).get("value", "").toStyledString()); + Pkt.WriteString(((Json::Value)*itr).get("signature", "").toStyledString()); + } + Pkt.WriteFPInt(a_Player.GetPosX()); Pkt.WriteFPInt(a_Player.GetPosY()); Pkt.WriteFPInt(a_Player.GetPosZ()); |