1
0
cuberite-2a/source/cPawn.h
mtilden@gmail.com 85debf0860 Linux fix
git-svn-id: http://mc-server.googlecode.com/svn/trunk@144 0a769ca7-a7f5-676a-18bf-c427514a06d6
2011-12-28 11:39:05 +00:00

55 lines
1.5 KiB
C++

#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 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 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