summaryrefslogtreecommitdiffstats
path: root/source/Protocol
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2013-11-08 22:40:31 +0100
committermadmaxoft <github@xoft.cz>2013-11-08 22:40:31 +0100
commit404034d230794df7864d7cd23605e56a4f9af264 (patch)
tree142953268ab8cc32aabc81ba698bda6645b678e8 /source/Protocol
parentDeclaring 1.7.2 compatibility. (diff)
downloadcuberite-404034d230794df7864d7cd23605e56a4f9af264.tar
cuberite-404034d230794df7864d7cd23605e56a4f9af264.tar.gz
cuberite-404034d230794df7864d7cd23605e56a4f9af264.tar.bz2
cuberite-404034d230794df7864d7cd23605e56a4f9af264.tar.lz
cuberite-404034d230794df7864d7cd23605e56a4f9af264.tar.xz
cuberite-404034d230794df7864d7cd23605e56a4f9af264.tar.zst
cuberite-404034d230794df7864d7cd23605e56a4f9af264.zip
Diffstat (limited to '')
-rw-r--r--source/Protocol/Protocol17x.cpp18
1 files changed, 17 insertions, 1 deletions
diff --git a/source/Protocol/Protocol17x.cpp b/source/Protocol/Protocol17x.cpp
index eee4f7d0e..9e230bafd 100644
--- a/source/Protocol/Protocol17x.cpp
+++ b/source/Protocol/Protocol17x.cpp
@@ -512,7 +512,23 @@ void cProtocol172::SendPlayerListItem(const cPlayer & a_Player, bool a_IsOnline)
void cProtocol172::SendPlayerMaxSpeed(void)
{
- SendPlayerAbilities();
+ cPacketizer Pkt(*this, 0x20); // Entity Properties
+ Pkt.WriteInt(m_Client->GetPlayer()->GetUniqueID());
+ Pkt.WriteInt(1); // Count
+ Pkt.WriteString("generic.movementSpeed");
+ Pkt.WriteDouble(0.1);
+ if (m_Client->GetPlayer()->IsSprinting())
+ {
+ Pkt.WriteShort(1); // Modifier count
+ Pkt.WriteInt64(0x662a6b8dda3e4c1c);
+ Pkt.WriteInt64(0x881396ea6097278d); // UUID of the modifier
+ Pkt.WriteDouble(0.3);
+ Pkt.WriteByte(2);
+ }
+ else
+ {
+ Pkt.WriteShort(0); // Modifier count
+ }
}