summaryrefslogtreecommitdiffstats
path: root/source/Protocol/Protocol125.cpp
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2013-11-17 23:12:09 +0100
committerMattes D <github@xoft.cz>2013-11-17 23:12:09 +0100
commitd169a1959dc5b6faa7033c78c9afd6f4c4eae604 (patch)
tree2a233fa7dc2b9f5fd4c9a5e040850313546403e5 /source/Protocol/Protocol125.cpp
parentLineBlockTracer: Using the coord-based block faces. (diff)
parentfix *.sdf? (diff)
downloadcuberite-d169a1959dc5b6faa7033c78c9afd6f4c4eae604.tar
cuberite-d169a1959dc5b6faa7033c78c9afd6f4c4eae604.tar.gz
cuberite-d169a1959dc5b6faa7033c78c9afd6f4c4eae604.tar.bz2
cuberite-d169a1959dc5b6faa7033c78c9afd6f4c4eae604.tar.lz
cuberite-d169a1959dc5b6faa7033c78c9afd6f4c4eae604.tar.xz
cuberite-d169a1959dc5b6faa7033c78c9afd6f4c4eae604.tar.zst
cuberite-d169a1959dc5b6faa7033c78c9afd6f4c4eae604.zip
Diffstat (limited to 'source/Protocol/Protocol125.cpp')
-rw-r--r--source/Protocol/Protocol125.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/source/Protocol/Protocol125.cpp b/source/Protocol/Protocol125.cpp
index 9f2770815..54be65b12 100644
--- a/source/Protocol/Protocol125.cpp
+++ b/source/Protocol/Protocol125.cpp
@@ -72,6 +72,7 @@ enum
PACKET_ENT_STATUS = 0x26,
PACKET_ATTACH_ENTITY = 0x27,
PACKET_METADATA = 0x28,
+ PACKET_EXPERIENCE = 0x2b,
PACKET_PRE_CHUNK = 0x32,
PACKET_MAP_CHUNK = 0x33,
PACKET_MULTI_BLOCK = 0x34,
@@ -690,6 +691,20 @@ void cProtocol125::SendRespawn(void)
+void cProtocol125::SendExperience(void)
+{
+ cCSLock Lock(m_CSPacket);
+ WriteByte (PACKET_EXPERIENCE);
+ WriteFloat (m_Client->GetPlayer()->GetXpPercentage());
+ WriteShort (m_Client->GetPlayer()->GetXpLevel());
+ WriteShort (m_Client->GetPlayer()->GetCurrentXp());
+ Flush();
+}
+
+
+
+
+
void cProtocol125::SendSoundEffect(const AString & a_SoundName, int a_SrcX, int a_SrcY, int a_SrcZ, float a_Volume, float a_Pitch)
{
// Not needed in this protocol version