summaryrefslogtreecommitdiffstats
path: root/source/cPawn.h
diff options
context:
space:
mode:
authorcedeel@gmail.com <cedeel@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-06-14 15:06:06 +0200
committercedeel@gmail.com <cedeel@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-06-14 15:06:06 +0200
commit92c59963f82f81aa3202657e7fdbb2592924ede3 (patch)
treeb7eb2474528a4998fa102e3ec9119b908cee08b4 /source/cPawn.h
parentAdded HOOK_WEATHER_CHANGE. (diff)
downloadcuberite-92c59963f82f81aa3202657e7fdbb2592924ede3.tar
cuberite-92c59963f82f81aa3202657e7fdbb2592924ede3.tar.gz
cuberite-92c59963f82f81aa3202657e7fdbb2592924ede3.tar.bz2
cuberite-92c59963f82f81aa3202657e7fdbb2592924ede3.tar.lz
cuberite-92c59963f82f81aa3202657e7fdbb2592924ede3.tar.xz
cuberite-92c59963f82f81aa3202657e7fdbb2592924ede3.tar.zst
cuberite-92c59963f82f81aa3202657e7fdbb2592924ede3.zip
Diffstat (limited to '')
-rw-r--r--source/cPawn.h164
1 files changed, 82 insertions, 82 deletions
diff --git a/source/cPawn.h b/source/cPawn.h
index 11b59575e..2c4444174 100644
--- a/source/cPawn.h
+++ b/source/cPawn.h
@@ -1,82 +1,82 @@
-
-#pragma once
-
-#include "cEntity.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() { return m_MetaData; }
-
- virtual void InStateBurning(float a_Dt);
-
- virtual void CheckMetaDataBurn();
-
- virtual void SetMaxHealth(short a_MaxHealth);
- 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 void SetMaxFoodSaturation(float a_MaxFoodSaturation);
- virtual float GetMaxFoodSaturation() { return fmod(m_MaxFoodLevel, 6.f); }
- virtual float GetFoodSaturation() { return fmod(m_FoodLevel, 6.f); }
-
- virtual void SetMaxFoodLevel(short a_MaxFoodLevel);
- virtual short GetMaxFoodLevel() { return m_MaxFoodLevel; }
-
-protected:
-
- short m_Health;
- short m_FoodLevel;
- short m_MaxHealth;
- short m_MaxFoodLevel;
-
- bool m_bBurnable;
-
- MetaData m_MetaData;
-
- double m_LastPosX, m_LastPosY, m_LastPosZ;
- float m_TimeLastTeleportPacket;
-
- float m_FireDamageInterval;
- float m_BurnPeriod;
-
-}; //tolua_export
-
-
-
-
+
+#pragma once
+
+#include "cEntity.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() { return m_MetaData; }
+
+ virtual void InStateBurning(float a_Dt);
+
+ virtual void CheckMetaDataBurn();
+
+ virtual void SetMaxHealth(short a_MaxHealth);
+ 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 void SetMaxFoodSaturation(float a_MaxFoodSaturation);
+ virtual float GetMaxFoodSaturation() { return fmod(m_MaxFoodLevel, 6.f); }
+ virtual float GetFoodSaturation() { return fmod(m_FoodLevel, 6.f); }
+
+ virtual void SetMaxFoodLevel(short a_MaxFoodLevel);
+ virtual short GetMaxFoodLevel() { return m_MaxFoodLevel; }
+
+protected:
+
+ short m_Health;
+ short m_FoodLevel;
+ short m_MaxHealth;
+ short m_MaxFoodLevel;
+
+ bool m_bBurnable;
+
+ MetaData m_MetaData;
+
+ double m_LastPosX, m_LastPosY, m_LastPosZ;
+ float m_TimeLastTeleportPacket;
+
+ float m_FireDamageInterval;
+ float m_BurnPeriod;
+
+}; //tolua_export
+
+
+
+