summaryrefslogtreecommitdiffstats
path: root/source/cPawn.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--source/cPawn.h14
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;