diff options
author | mathiascode <mail@mathias.is> | 2020-12-13 20:21:50 +0100 |
---|---|---|
committer | Tiger Wang <ziwei.tiger@outlook.com> | 2020-12-18 22:03:50 +0100 |
commit | 21033086187bfb535200a04c2d1bcb867f9195db (patch) | |
tree | dabdda64b5a813f1dd75e8411c5431caec14df70 /src/Protocol | |
parent | Warnings improvements (diff) | |
download | cuberite-21033086187bfb535200a04c2d1bcb867f9195db.tar cuberite-21033086187bfb535200a04c2d1bcb867f9195db.tar.gz cuberite-21033086187bfb535200a04c2d1bcb867f9195db.tar.bz2 cuberite-21033086187bfb535200a04c2d1bcb867f9195db.tar.lz cuberite-21033086187bfb535200a04c2d1bcb867f9195db.tar.xz cuberite-21033086187bfb535200a04c2d1bcb867f9195db.tar.zst cuberite-21033086187bfb535200a04c2d1bcb867f9195db.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Protocol/Protocol_1_8.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/Protocol/Protocol_1_8.cpp b/src/Protocol/Protocol_1_8.cpp index 49418b475..d9d18b41a 100644 --- a/src/Protocol/Protocol_1_8.cpp +++ b/src/Protocol/Protocol_1_8.cpp @@ -2641,17 +2641,13 @@ void cProtocol_1_8_0::HandlePacketPlayerAbilities(cByteBuffer & a_ByteBuffer) HANDLE_READ(a_ByteBuffer, ReadBEFloat, float, WalkingSpeed); // COnvert the bitfield into individual boolean flags: - bool IsFlying = false, CanFly = false; + bool IsFlying = false; if ((Flags & 2) != 0) { IsFlying = true; } - if ((Flags & 4) != 0) - { - CanFly = true; - } - m_Client->HandlePlayerAbilities(CanFly, IsFlying, FlyingSpeed, WalkingSpeed); + m_Client->HandlePlayerAbilities(IsFlying, FlyingSpeed, WalkingSpeed); } |