diff options
author | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-12-21 12:04:08 +0100 |
---|---|---|
committer | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-12-21 12:04:08 +0100 |
commit | 912a1e7adc650d20b0302a3dfe45816b5e541bc7 (patch) | |
tree | 65e7ffbf33d8f1335a4997fc5a727739f9dcdd34 /source/Mobs/Monster.h | |
parent | Extended player inventory by direct r/o access to armor slots (diff) | |
download | cuberite-912a1e7adc650d20b0302a3dfe45816b5e541bc7.tar cuberite-912a1e7adc650d20b0302a3dfe45816b5e541bc7.tar.gz cuberite-912a1e7adc650d20b0302a3dfe45816b5e541bc7.tar.bz2 cuberite-912a1e7adc650d20b0302a3dfe45816b5e541bc7.tar.lz cuberite-912a1e7adc650d20b0302a3dfe45816b5e541bc7.tar.xz cuberite-912a1e7adc650d20b0302a3dfe45816b5e541bc7.tar.zst cuberite-912a1e7adc650d20b0302a3dfe45816b5e541bc7.zip |
Diffstat (limited to '')
-rw-r--r-- | source/Mobs/Monster.h | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/source/Mobs/Monster.h b/source/Mobs/Monster.h index f0da23977..6d3d1d775 100644 --- a/source/Mobs/Monster.h +++ b/source/Mobs/Monster.h @@ -17,14 +17,18 @@ class cClientHandle; -class cMonster : public cPawn //tolua_export -{ //tolua_export +// tolua_begin +class cMonster : + public cPawn +{ + typedef cPawn super; public: - - cMonster(); + // tolua_end + + cMonster(void); virtual ~cMonster(); - virtual bool IsA( const char* a_EntityType ); + virtual bool IsA(const char * a_EntityType); virtual void SpawnOn(cClientHandle & a_ClientHandle) override; @@ -33,8 +37,9 @@ public: virtual void HandlePhysics(float a_Dt); virtual void ReplicateMovement(void); - virtual void TakeDamage(int a_Damage, cEntity * a_Instigator) override; - virtual void KilledBy(cEntity * a_Killer) override; + virtual void DoTakeDamage(TakeDamageInfo & a_TDI) override; + + virtual void KilledBy(cPawn * a_Killer) override; virtual void MoveToPosition(const Vector3f & a_Position); virtual bool ReachedDestination(void); @@ -47,7 +52,7 @@ public: virtual void CheckEventSeePlayer(); virtual void EventSeePlayer(cEntity *); float m_SightDistance; - virtual cPlayer *FindClosestPlayer(); //non static is easier. also virtual so other mobs can implement their own searching algo + virtual cPlayer * FindClosestPlayer(); // non static is easier. also virtual so other mobs can implement their own searching algo virtual void GetMonsterConfig(const char* pm_name); virtual void EventLosePlayer(); virtual void CheckEventLostPlayer(); @@ -69,7 +74,7 @@ public: protected: - cEntity* m_Target; + cEntity * m_Target; float m_AttackRate; float idle_interval; @@ -94,7 +99,7 @@ protected: float m_AttackInterval; void AddRandomDropItem(cItems & a_Drops, unsigned int a_Min, unsigned int a_Max, short a_Item, short a_ItemHealth = 0); -}; //tolua_export +} ; // tolua_export |