diff options
author | mtilden@gmail.com <mtilden@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2011-12-29 16:31:48 +0100 |
---|---|---|
committer | mtilden@gmail.com <mtilden@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2011-12-29 16:31:48 +0100 |
commit | d7adbba59d2372234a616b87f8b3b5a03888ddbc (patch) | |
tree | ee465a22205a21de84b57b931a15942382acc9a0 /source/cPawn.h | |
parent | M$ BS... (diff) | |
download | cuberite-d7adbba59d2372234a616b87f8b3b5a03888ddbc.tar cuberite-d7adbba59d2372234a616b87f8b3b5a03888ddbc.tar.gz cuberite-d7adbba59d2372234a616b87f8b3b5a03888ddbc.tar.bz2 cuberite-d7adbba59d2372234a616b87f8b3b5a03888ddbc.tar.lz cuberite-d7adbba59d2372234a616b87f8b3b5a03888ddbc.tar.xz cuberite-d7adbba59d2372234a616b87f8b3b5a03888ddbc.tar.zst cuberite-d7adbba59d2372234a616b87f8b3b5a03888ddbc.zip |
Diffstat (limited to '')
-rw-r--r-- | source/cPawn.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/source/cPawn.h b/source/cPawn.h index 24209dc76..e075b422e 100644 --- a/source/cPawn.h +++ b/source/cPawn.h @@ -1,5 +1,6 @@ #pragma once
#include "cEntity.h"
+#include "math.h"
struct TakeDamageInfo //tolua_export
{ //tolua_export
@@ -37,9 +38,22 @@ public: virtual inline void SetMaxHealth(short a_MaxHealth);
virtual inline short GetMaxHealth() { return m_MaxHealth; }
+ //virtual inline void SetMaxFood(short a_MaxFood);
+ virtual inline short GetMaxFood() { return m_MaxFoodLevel/6; }
+ virtual inline short GetFood() { return m_FoodLevel/6; }
+
+ //virtual inline void SetMaxFoodSaturation(float a_MaxFoodSaturation);
+ virtual inline float GetMaxFoodSaturation() { return fmod(m_MaxFoodLevel, 6.f); }
+ virtual inline float GetFoodSaturation() { return fmod(m_FoodLevel, 6.f); }
+
+ virtual inline void SetMaxFoodLevel(short a_MaxFoodLevel);
+ virtual inline short GetMaxFoodLevel() { return m_MaxFoodLevel; }
+
protected:
short m_Health;
+ short m_FoodLevel;
short m_MaxHealth;
+ short m_MaxFoodLevel;
bool m_bBurnable;
|