summaryrefslogtreecommitdiffstats
path: root/src/Entities
diff options
context:
space:
mode:
authorSTRWarrior <niels.breuker@hotmail.nl>2013-12-19 17:33:21 +0100
committerSTRWarrior <niels.breuker@hotmail.nl>2013-12-19 17:33:21 +0100
commit3d70d7198dbd2b9f71a9cf37bd0cf985495e6b00 (patch)
tree825b00a10ae4279ce6c8ce47f74654dadfb5a3d9 /src/Entities
parentAdded cFloater class. (diff)
downloadcuberite-3d70d7198dbd2b9f71a9cf37bd0cf985495e6b00.tar
cuberite-3d70d7198dbd2b9f71a9cf37bd0cf985495e6b00.tar.gz
cuberite-3d70d7198dbd2b9f71a9cf37bd0cf985495e6b00.tar.bz2
cuberite-3d70d7198dbd2b9f71a9cf37bd0cf985495e6b00.tar.lz
cuberite-3d70d7198dbd2b9f71a9cf37bd0cf985495e6b00.tar.xz
cuberite-3d70d7198dbd2b9f71a9cf37bd0cf985495e6b00.tar.zst
cuberite-3d70d7198dbd2b9f71a9cf37bd0cf985495e6b00.zip
Diffstat (limited to '')
-rw-r--r--src/Entities/Player.cpp2
-rw-r--r--src/Entities/Player.h10
2 files changed, 12 insertions, 0 deletions
diff --git a/src/Entities/Player.cpp b/src/Entities/Player.cpp
index 7e7d77433..577a33ad9 100644
--- a/src/Entities/Player.cpp
+++ b/src/Entities/Player.cpp
@@ -65,6 +65,8 @@ cPlayer::cPlayer(cClientHandle* a_Client, const AString & a_PlayerName)
, m_IsSubmerged(false)
, m_IsFlying(false)
, m_CanFly(false)
+ , m_IsFishing(false)
+ , m_FloaterID(-1)
, m_EatingFinishTick(-1)
, m_IsChargingBow(false)
, m_BowCharge(0)
diff --git a/src/Entities/Player.h b/src/Entities/Player.h
index 59e941040..74da857e8 100644
--- a/src/Entities/Player.h
+++ b/src/Entities/Player.h
@@ -253,6 +253,14 @@ public:
/// Returns true if the player is currently flying.
bool IsFlying(void) const { return m_IsFlying; }
+
+ /// returns true if the player has thrown out a floater.
+ bool IsFishing(void) const { return m_IsFishing; }
+
+ void SetIsFishing(bool a_IsFishing, int a_FloaterID = -1) { m_IsFishing = a_IsFishing; m_FloaterID = a_FloaterID; }
+
+ int GetFloaterID(void) const { return m_FloaterID; }
+
// tolua_end
/// Starts eating the currently equipped item. Resets the eating timer and sends the proper animation packet
@@ -429,6 +437,7 @@ protected:
bool m_IsFlying;
bool m_IsSwimming;
bool m_IsSubmerged;
+ bool m_IsFishing;
bool m_CanFly; // If this is true the player can fly. Even if he is not in creative.
@@ -445,6 +454,7 @@ protected:
bool m_IsChargingBow;
int m_BowCharge;
+ int m_FloaterID;
virtual void Destroyed(void);