diff options
author | Howaner <franzi.moos@googlemail.com> | 2014-06-16 21:57:23 +0200 |
---|---|---|
committer | Howaner <franzi.moos@googlemail.com> | 2014-06-16 21:57:23 +0200 |
commit | e50423991e56f1edb0954f2db066acd1f27b4ed7 (patch) | |
tree | ccc4e7a84826e6e6a2a0ad2f578b29701c381361 /src | |
parent | Merge pull request #883 from mc-server/CutOffLighting (diff) | |
download | cuberite-e50423991e56f1edb0954f2db066acd1f27b4ed7.tar cuberite-e50423991e56f1edb0954f2db066acd1f27b4ed7.tar.gz cuberite-e50423991e56f1edb0954f2db066acd1f27b4ed7.tar.bz2 cuberite-e50423991e56f1edb0954f2db066acd1f27b4ed7.tar.lz cuberite-e50423991e56f1edb0954f2db066acd1f27b4ed7.tar.xz cuberite-e50423991e56f1edb0954f2db066acd1f27b4ed7.tar.zst cuberite-e50423991e56f1edb0954f2db066acd1f27b4ed7.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Entities/Player.cpp | 6 | ||||
-rw-r--r-- | src/Entities/Player.h | 2 |
2 files changed, 6 insertions, 2 deletions
diff --git a/src/Entities/Player.cpp b/src/Entities/Player.cpp index fdc0bb390..978517086 100644 --- a/src/Entities/Player.cpp +++ b/src/Entities/Player.cpp @@ -1,4 +1,4 @@ - + #include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules #include "Player.h" @@ -411,6 +411,7 @@ void cPlayer::StartChargingBow(void) LOGD("Player \"%s\" started charging their bow", GetName().c_str()); m_IsChargingBow = true; m_BowCharge = 0; + m_World->BroadcastEntityMetadata(*this, m_ClientHandle); } @@ -423,6 +424,8 @@ int cPlayer::FinishChargingBow(void) int res = m_BowCharge; m_IsChargingBow = false; m_BowCharge = 0; + m_World->BroadcastEntityMetadata(*this, m_ClientHandle); + return res; } @@ -435,6 +438,7 @@ void cPlayer::CancelChargingBow(void) LOGD("Player \"%s\" cancelled charging their bow at a charge of %d", GetName().c_str(), m_BowCharge); m_IsChargingBow = false; m_BowCharge = 0; + m_World->BroadcastEntityMetadata(*this, m_ClientHandle); } diff --git a/src/Entities/Player.h b/src/Entities/Player.h index b2142a18b..2f7957f16 100644 --- a/src/Entities/Player.h +++ b/src/Entities/Player.h @@ -404,7 +404,7 @@ public: // cEntity overrides: virtual bool IsCrouched (void) const { return m_IsCrouched; } virtual bool IsSprinting(void) const { return m_IsSprinting; } - virtual bool IsRclking (void) const { return IsEating(); } + virtual bool IsRclking (void) const { return IsEating() || IsChargingBow(); } virtual void Detach(void); |