summaryrefslogtreecommitdiffstats
path: root/source/cPawn.h
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-02-13 22:47:03 +0100
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-02-13 22:47:03 +0100
commit4f17362aeb80e5339c58a5d3b0fbaeb88d9e701c (patch)
treefebea3ecd89c0d4aa83924e430bf11366d754733 /source/cPawn.h
parentNew makefile with automatic *.cpp sourcefile import, automatic header file dependencies and switchable debug / release configuration. gnumake-specific :( (diff)
downloadcuberite-4f17362aeb80e5339c58a5d3b0fbaeb88d9e701c.tar
cuberite-4f17362aeb80e5339c58a5d3b0fbaeb88d9e701c.tar.gz
cuberite-4f17362aeb80e5339c58a5d3b0fbaeb88d9e701c.tar.bz2
cuberite-4f17362aeb80e5339c58a5d3b0fbaeb88d9e701c.tar.lz
cuberite-4f17362aeb80e5339c58a5d3b0fbaeb88d9e701c.tar.xz
cuberite-4f17362aeb80e5339c58a5d3b0fbaeb88d9e701c.tar.zst
cuberite-4f17362aeb80e5339c58a5d3b0fbaeb88d9e701c.zip
Diffstat (limited to '')
-rw-r--r--source/cPawn.h24
1 files changed, 19 insertions, 5 deletions
diff --git a/source/cPawn.h b/source/cPawn.h
index a5156cec3..b35350392 100644
--- a/source/cPawn.h
+++ b/source/cPawn.h
@@ -1,6 +1,11 @@
+
#pragma once
+
#include "cEntity.h"
-#include "math.h"
+
+
+
+
struct TakeDamageInfo //tolua_export
{ //tolua_export
@@ -8,6 +13,10 @@ struct TakeDamageInfo //tolua_export
cEntity* Instigator; //tolua_export
}; //tolua_export
+
+
+
+
class cPawn : public cEntity //tolua_export
{ //tolua_export
public:
@@ -19,7 +28,7 @@ public:
virtual void TeleportTo( cEntity* a_Entity ); //tolua_export
virtual void TeleportTo( const double & a_PosX, const double & a_PosY, const double & a_PosZ ); //tolua_export
- virtual void Tick(float a_Dt);
+ virtual void Tick(float a_Dt) override;
void Heal( int a_Health ); //tolua_export
virtual void TakeDamage( int a_Damage, cEntity* a_Instigator ); //tolua_export
@@ -39,8 +48,8 @@ public:
virtual short GetMaxHealth() { return m_MaxHealth; }
//virtual void SetMaxFood(short a_MaxFood);
- virtual short GetMaxFood() { return m_MaxFoodLevel/6; }
- virtual short GetFood() { return m_FoodLevel/6; }
+ virtual short GetMaxFood() { return m_MaxFoodLevel / 6; }
+ virtual short GetFood() { return m_FoodLevel / 6; }
//virtual void SetMaxFoodSaturation(float a_MaxFoodSaturation);
virtual float GetMaxFoodSaturation() { return fmod(m_MaxFoodLevel, 6.f); }
@@ -50,6 +59,7 @@ public:
virtual short GetMaxFoodLevel() { return m_MaxFoodLevel; }
protected:
+
short m_Health;
short m_FoodLevel;
short m_MaxHealth;
@@ -57,7 +67,7 @@ protected:
bool m_bBurnable;
- MetaData m_MetaData;
+ MetaData m_MetaData;
double m_LastPosX, m_LastPosY, m_LastPosZ;
float m_TimeLastTeleportPacket;
@@ -66,3 +76,7 @@ protected:
float m_BurnPeriod;
}; //tolua_export
+
+
+
+