diff options
author | STRWarrior <niels.breuker@hotmail.nl> | 2013-12-15 15:11:59 +0100 |
---|---|---|
committer | STRWarrior <niels.breuker@hotmail.nl> | 2013-12-15 15:11:59 +0100 |
commit | ffb5a69a9e1e531cb8effc72d2a2ad0a459981e3 (patch) | |
tree | f5781bbf67e56ba1bc91ec213812524addbc2e6a /src/ClientHandle.cpp | |
parent | Exported Set and Get functions to Lua. (diff) | |
download | cuberite-ffb5a69a9e1e531cb8effc72d2a2ad0a459981e3.tar cuberite-ffb5a69a9e1e531cb8effc72d2a2ad0a459981e3.tar.gz cuberite-ffb5a69a9e1e531cb8effc72d2a2ad0a459981e3.tar.bz2 cuberite-ffb5a69a9e1e531cb8effc72d2a2ad0a459981e3.tar.lz cuberite-ffb5a69a9e1e531cb8effc72d2a2ad0a459981e3.tar.xz cuberite-ffb5a69a9e1e531cb8effc72d2a2ad0a459981e3.tar.zst cuberite-ffb5a69a9e1e531cb8effc72d2a2ad0a459981e3.zip |
Diffstat (limited to '')
-rw-r--r-- | src/ClientHandle.cpp | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/src/ClientHandle.cpp b/src/ClientHandle.cpp index 68c511d7c..d585eccf1 100644 --- a/src/ClientHandle.cpp +++ b/src/ClientHandle.cpp @@ -490,24 +490,10 @@ void cClientHandle::HandleCreativeInventory(short a_SlotNum, const cItem & a_Hel -void cClientHandle::HandlePlayerAbilities(int Flags, float FlyingSpeed, float WalkingSpeed) +void cClientHandle::HandlePlayerAbilities(bool a_CanFly, bool a_IsFlying, float FlyingSpeed, float WalkingSpeed) { - if ((Flags & 2) != 0) - { - m_Player->SetFlying(true); - } - else - { - m_Player->SetFlying(false); - } - if ((Flags & 4) != 0) - { - m_Player->SetCanFly(true); - } - else - { - m_Player->SetCanFly(false); - } + m_Player->SetCanFly(a_CanFly); + m_Player->SetFlying(a_IsFlying); } |