summaryrefslogtreecommitdiffstats
path: root/source/cPawn.h
diff options
context:
space:
mode:
authorlapayo94@gmail.com <lapayo94@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2011-12-28 03:10:05 +0100
committerlapayo94@gmail.com <lapayo94@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2011-12-28 03:10:05 +0100
commit1e9af56a67ae3765291361d9bf01e9009cfb4dcc (patch)
tree65878a8c373ec163eed3439b7db0fc440810d95b /source/cPawn.h
parentFixed some things in Core to work for multiple worlds (diff)
downloadcuberite-1e9af56a67ae3765291361d9bf01e9009cfb4dcc.tar
cuberite-1e9af56a67ae3765291361d9bf01e9009cfb4dcc.tar.gz
cuberite-1e9af56a67ae3765291361d9bf01e9009cfb4dcc.tar.bz2
cuberite-1e9af56a67ae3765291361d9bf01e9009cfb4dcc.tar.lz
cuberite-1e9af56a67ae3765291361d9bf01e9009cfb4dcc.tar.xz
cuberite-1e9af56a67ae3765291361d9bf01e9009cfb4dcc.tar.zst
cuberite-1e9af56a67ae3765291361d9bf01e9009cfb4dcc.zip
Diffstat (limited to 'source/cPawn.h')
-rw-r--r--source/cPawn.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/source/cPawn.h b/source/cPawn.h
index 2339bde03..ff90e7276 100644
--- a/source/cPawn.h
+++ b/source/cPawn.h
@@ -18,14 +18,37 @@ 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);
+
void Heal( int a_Health ); //tolua_export
virtual void TakeDamage( int a_Damage, cEntity* a_Instigator ); //tolua_export
virtual void KilledBy( cEntity* a_Killer ); //tolua_export
int GetHealth() { return m_Health; } //tolua_export
+ enum MetaData {NORMAL, BURNING, CROUCHED, RIDING, SPRINTING, EATING, BLOCKING};
+
+ virtual inline void SetMetaData(MetaData a_MetaData);
+ virtual inline MetaData cPawn::GetMetaData() { return m_MetaData; }
+
+ virtual inline void InStateBurning(float a_Dt);
+
+ virtual void CheckMetaDataBurn();
+
+ virtual inline void SetMaxHealth(short a_MaxHealth);
+ virtual inline short GetMaxHealth() { return m_MaxHealth; }
+
protected:
short m_Health;
+ short m_MaxHealth;
+
+ bool m_bBurnable;
+
+ MetaData m_MetaData;
double m_LastPosX, m_LastPosY, m_LastPosZ;
float m_TimeLastTeleportPacket;
+
+ float m_FireDamageInterval;
+ float m_BurnPeriod;
+
}; //tolua_export