From 17ad4c2610f2c33d5b4a8b42b7d4b8fbda9ade32 Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Fri, 30 Aug 2013 14:24:03 +0200 Subject: Shooting a bow kinda works. The arrow is released, but sometimes hits wrong blocks or disappears completely. --- source/Entities/Player.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'source/Entities/Player.h') diff --git a/source/Entities/Player.h b/source/Entities/Player.h index 5dcce8421..4adf946db 100644 --- a/source/Entities/Player.h +++ b/source/Entities/Player.h @@ -62,6 +62,18 @@ public: /// Returns the currently equipped boots; empty item if none virtual cItem GetEquippedBoots(void) const override { return m_Inventory.GetEquippedBoots(); } + + /// Starts charging the equipped bow + void StartChargingBow(void); + + /// Finishes charging the current bow. Returns the number of ticks for which the bow has been charged + int FinishChargingBow(void); + + /// Cancels the current bow charging + void CancelChargingBow(void); + + /// Returns true if the player is currently charging the bow + bool IsChargingBox(void) const { return m_IsChargingBow; } void SetTouchGround( bool a_bTouchGround ); inline void SetStance( const double a_Stance ) { m_Stance = a_Stance; } @@ -351,6 +363,9 @@ protected: /// The world tick in which eating will be finished. -1 if not eating Int64 m_EatingFinishTick; + + bool m_IsChargingBow; + int m_BowCharge; virtual void Destroyed(void); -- cgit v1.2.3