summaryrefslogtreecommitdiffstats
path: root/source/Pawn.h
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-09-24 00:09:57 +0200
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-09-24 00:09:57 +0200
commitecfe6ab65bd1fc2c7f5733fe6ef4e6ddaac44a26 (patch)
tree898e37fe747f0fdcefeb88f833557fd45db3347c /source/Pawn.h
parentSource files cleanup: ChunkDataSerializer is Protocol-related (diff)
downloadcuberite-ecfe6ab65bd1fc2c7f5733fe6ef4e6ddaac44a26.tar
cuberite-ecfe6ab65bd1fc2c7f5733fe6ef4e6ddaac44a26.tar.gz
cuberite-ecfe6ab65bd1fc2c7f5733fe6ef4e6ddaac44a26.tar.bz2
cuberite-ecfe6ab65bd1fc2c7f5733fe6ef4e6ddaac44a26.tar.lz
cuberite-ecfe6ab65bd1fc2c7f5733fe6ef4e6ddaac44a26.tar.xz
cuberite-ecfe6ab65bd1fc2c7f5733fe6ef4e6ddaac44a26.tar.zst
cuberite-ecfe6ab65bd1fc2c7f5733fe6ef4e6ddaac44a26.zip
Diffstat (limited to 'source/Pawn.h')
-rw-r--r--source/Pawn.h66
1 files changed, 66 insertions, 0 deletions
diff --git a/source/Pawn.h b/source/Pawn.h
new file mode 100644
index 000000000..9cc106cc1
--- /dev/null
+++ b/source/Pawn.h
@@ -0,0 +1,66 @@
+
+#pragma once
+
+#include "Entity.h"
+
+
+
+
+
+struct TakeDamageInfo //tolua_export
+{ //tolua_export
+ int Damage; //tolua_export
+ cEntity* Instigator; //tolua_export
+}; //tolua_export
+
+
+
+
+
+class cPawn : public cEntity //tolua_export
+{ //tolua_export
+public:
+ CLASS_PROTOTYPE()
+
+ cPawn();
+ virtual ~cPawn();
+
+ virtual void TeleportToEntity( 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) override;
+
+ 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 void SetMetaData(MetaData a_MetaData);
+ virtual MetaData GetMetaData(void) const { return m_MetaData; }
+
+ virtual void InStateBurning(float a_Dt);
+
+ virtual void CheckMetaDataBurn();
+
+ virtual void SetMaxHealth(short a_MaxHealth);
+ virtual 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;
+}; //tolua_export
+
+
+
+