summaryrefslogtreecommitdiffstats
path: root/source/cPlayer.h
diff options
context:
space:
mode:
authorlapayo94@gmail.com <lapayo94@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-07-17 14:02:03 +0200
committerlapayo94@gmail.com <lapayo94@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-07-17 14:02:03 +0200
commitf473f13585e1bc901bfeb05cd5a9bb35489595da (patch)
tree48d9f165c1c154ae5baefe9712b990f837edfd37 /source/cPlayer.h
parentFixed compilation on OS X and maybe *nix as well (diff)
downloadcuberite-f473f13585e1bc901bfeb05cd5a9bb35489595da.tar
cuberite-f473f13585e1bc901bfeb05cd5a9bb35489595da.tar.gz
cuberite-f473f13585e1bc901bfeb05cd5a9bb35489595da.tar.bz2
cuberite-f473f13585e1bc901bfeb05cd5a9bb35489595da.tar.lz
cuberite-f473f13585e1bc901bfeb05cd5a9bb35489595da.tar.xz
cuberite-f473f13585e1bc901bfeb05cd5a9bb35489595da.tar.zst
cuberite-f473f13585e1bc901bfeb05cd5a9bb35489595da.zip
Diffstat (limited to 'source/cPlayer.h')
-rw-r--r--source/cPlayer.h20
1 files changed, 17 insertions, 3 deletions
diff --git a/source/cPlayer.h b/source/cPlayer.h
index ef85a1d4e..c1420023e 100644
--- a/source/cPlayer.h
+++ b/source/cPlayer.h
@@ -83,7 +83,15 @@ public:
void Heal( int a_Health ); //tolua_export
/// Returns true if any food has been consumed, false if player "full"
- bool Feed(short a_Food);
+ bool Feed(short a_Food, float a_Saturation);
+
+ short GetMaxFoodLevel() { return m_MaxFoodLevel; }
+ short GetFoodLevel() { return m_FoodLevel; }
+
+ float GetMaxFoodSaturationLevel() { return m_MaxFoodSaturationLevel; }
+ float GetFoodSaturationLevel() { return m_FoodSaturationLevel; }
+
+ void AddFoodExhaustion(float a_Exhaustion) { m_FoodExhaustionLevel += a_Exhaustion; }
void TakeDamage( int a_Damage, cEntity* a_Instigator ); //tolua_export
void KilledBy( cEntity* a_Killer ); //tolua_export
@@ -102,8 +110,7 @@ public:
void UseEquippedItem(void);
- /// Returns true if the item type is edible && it has been consumed, false otherwise
- bool EatItem(int a_ItemType);
+ void SendHealth();
protected:
virtual void Destroyed();
@@ -120,6 +127,13 @@ protected:
bool m_bVisible;
+ short m_FoodLevel;
+ short m_MaxFoodLevel;
+ float m_FoodSaturationLevel;
+ float m_MaxFoodSaturationLevel;
+ float m_FoodExhaustionLevel;
+ char m_FoodTickTimer;
+
float m_LastGroundHeight;
bool m_bTouchGround;
double m_Stance;