diff options
author | STRWarrior <niels.breuker@hotmail.nl> | 2013-12-15 14:48:17 +0100 |
---|---|---|
committer | STRWarrior <niels.breuker@hotmail.nl> | 2013-12-15 14:48:17 +0100 |
commit | b10d0b95cbdce1d476f14415901c89bf324c0c18 (patch) | |
tree | 00aff412ae4fe7c691dc18f2fc3d6fd61dde8a60 /src/Protocol/Protocol17x.cpp | |
parent | Merge pull request #432 from mc-server/Broadcast_Effects (diff) | |
download | cuberite-b10d0b95cbdce1d476f14415901c89bf324c0c18.tar cuberite-b10d0b95cbdce1d476f14415901c89bf324c0c18.tar.gz cuberite-b10d0b95cbdce1d476f14415901c89bf324c0c18.tar.bz2 cuberite-b10d0b95cbdce1d476f14415901c89bf324c0c18.tar.lz cuberite-b10d0b95cbdce1d476f14415901c89bf324c0c18.tar.xz cuberite-b10d0b95cbdce1d476f14415901c89bf324c0c18.tar.zst cuberite-b10d0b95cbdce1d476f14415901c89bf324c0c18.zip |
Diffstat (limited to 'src/Protocol/Protocol17x.cpp')
-rw-r--r-- | src/Protocol/Protocol17x.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/Protocol/Protocol17x.cpp b/src/Protocol/Protocol17x.cpp index 0daf1c932..9b2b19026 100644 --- a/src/Protocol/Protocol17x.cpp +++ b/src/Protocol/Protocol17x.cpp @@ -491,7 +491,15 @@ void cProtocol172::SendPlayerAbilities(void) { Flags |= 0x01; } - // TODO: Other flags (god mode, flying, can fly + if (m_Client->GetPlayer()->IsFlying()) + { + Flags |= 0x02; + } + if (m_Client->GetPlayer()->CanFly()) + { + Flags |= 0x04; + } + // TODO: Other flags (god mode) Pkt.WriteByte(Flags); // TODO: Pkt.WriteFloat(m_Client->GetPlayer()->GetMaxFlyingSpeed()); Pkt.WriteFloat(0.05f); @@ -1278,7 +1286,7 @@ void cProtocol172::HandlePacketPlayerAbilities(cByteBuffer & a_ByteBuffer) HANDLE_READ(a_ByteBuffer, ReadByte, Byte, Flags); HANDLE_READ(a_ByteBuffer, ReadBEFloat, float, FlyingSpeed); HANDLE_READ(a_ByteBuffer, ReadBEFloat, float, WalkingSpeed); - // TODO: m_Client->HandlePlayerAbilities(); + m_Client->HandlePlayerAbilities(Flags, FlyingSpeed, WalkingSpeed); } |