2012-06-14 09:06:06 -04:00
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2012-09-23 18:09:57 -04:00
|
|
|
#include "Entity.h"
|
2012-06-14 09:06:06 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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:
|
2012-08-03 07:53:11 -04:00
|
|
|
CLASS_PROTOTYPE()
|
2012-06-14 09:06:06 -04:00
|
|
|
|
|
|
|
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);
|
2012-08-19 17:14:45 -04:00
|
|
|
virtual MetaData GetMetaData(void) const { return m_MetaData; }
|
2012-06-14 09:06:06 -04:00
|
|
|
|
|
|
|
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;
|
2012-07-17 08:02:03 -04:00
|
|
|
|
2012-06-14 09:06:06 -04:00
|
|
|
|
|
|
|
bool m_bBurnable;
|
|
|
|
|
|
|
|
MetaData m_MetaData;
|
|
|
|
|
|
|
|
double m_LastPosX, m_LastPosY, m_LastPosZ;
|
2012-11-01 17:38:20 -04:00
|
|
|
Int64 m_TimeLastTeleportPacket; // In ticks
|
2012-06-14 09:06:06 -04:00
|
|
|
}; //tolua_export
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|