summaryrefslogtreecommitdiffstats
path: root/src/Entities
diff options
context:
space:
mode:
authorHowaner <franzi.moos@googlemail.com>2014-06-16 21:57:23 +0200
committerHowaner <franzi.moos@googlemail.com>2014-06-16 21:57:23 +0200
commite50423991e56f1edb0954f2db066acd1f27b4ed7 (patch)
treeccc4e7a84826e6e6a2a0ad2f578b29701c381361 /src/Entities
parentMerge pull request #883 from mc-server/CutOffLighting (diff)
downloadcuberite-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.cpp6
-rw-r--r--src/Entities/Player.h2
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);