summaryrefslogtreecommitdiffstats
path: root/source/Protocol/Protocol16x.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/Protocol/Protocol16x.cpp')
-rw-r--r--source/Protocol/Protocol16x.cpp28
1 files changed, 24 insertions, 4 deletions
diff --git a/source/Protocol/Protocol16x.cpp b/source/Protocol/Protocol16x.cpp
index d9cec5345..8c93d6052 100644
--- a/source/Protocol/Protocol16x.cpp
+++ b/source/Protocol/Protocol16x.cpp
@@ -35,10 +35,12 @@ Implements the 1.6.x protocol classes:
enum
{
- PACKET_CHAT = 0x03,
- PACKET_UPDATE_HEALTH = 0x08,
- PACKET_ATTACH_ENTITY = 0x27,
- PACKET_WINDOW_OPEN = 0x64,
+ PACKET_CHAT = 0x03,
+ PACKET_UPDATE_HEALTH = 0x08,
+ PACKET_ATTACH_ENTITY = 0x27,
+ PACKET_ENTITY_PROPERTIES = 0x2c,
+ PACKET_WINDOW_OPEN = 0x64,
+ PACKET_PLAYER_ABILITIES = 0xca,
} ;
@@ -77,6 +79,24 @@ void cProtocol161::SendChat(const AString & a_Message)
+void cProtocol161::SendGameMode(eGameMode a_GameMode)
+{
+ super::SendGameMode(a_GameMode);
+
+ // Also send the EntityProperties packet specifying the movementSpeed:
+ cCSLock Lock(m_CSPacket);
+ WriteByte(PACKET_ENTITY_PROPERTIES);
+ WriteInt(m_Client->GetPlayer()->GetUniqueID());
+ WriteInt(1);
+ WriteString("generic.movementSpeed");
+ WriteDouble(0.1);
+ Flush();
+}
+
+
+
+
+
void cProtocol161::SendHealth(void)
{
cCSLock Lock(m_CSPacket);