diff options
author | Samuel Barney <samjbarney@gmail.com> | 2014-08-26 01:22:16 +0200 |
---|---|---|
committer | Samuel Barney <samjbarney@gmail.com> | 2014-08-26 01:22:16 +0200 |
commit | e2f1200c29de5f72125247b0516a1810909e9622 (patch) | |
tree | 238cb4727ceb6c93bc0cf2a1c6c4d37ede6da948 | |
parent | Added some functionality to the Attack Component (diff) | |
download | cuberite-e2f1200c29de5f72125247b0516a1810909e9622.tar cuberite-e2f1200c29de5f72125247b0516a1810909e9622.tar.gz cuberite-e2f1200c29de5f72125247b0516a1810909e9622.tar.bz2 cuberite-e2f1200c29de5f72125247b0516a1810909e9622.tar.lz cuberite-e2f1200c29de5f72125247b0516a1810909e9622.tar.xz cuberite-e2f1200c29de5f72125247b0516a1810909e9622.tar.zst cuberite-e2f1200c29de5f72125247b0516a1810909e9622.zip |
-rw-r--r-- | src/Mobs/Monster.h | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/src/Mobs/Monster.h b/src/Mobs/Monster.h index a3febc568..587c503e3 100644 --- a/src/Mobs/Monster.h +++ b/src/Mobs/Monster.h @@ -69,6 +69,11 @@ public: protected: eType m_MobType; + + cAIComponent * m_AI; + cAttackComponent * m_Attack; + cEnvironmentComponent * m_Environment; + cMovementComponent * m_Movement; public: cMonster(const AString & a_ConfigName, eType a_MobType, const AString & a_SoundHurt, const AString & a_SoundDeath, double a_Width, double a_Height); virtual void SpawnOn(cClientHandle & a_ClientHandle) /*override*/; @@ -78,6 +83,12 @@ public: virtual bool IsTame (void) const { return false; } virtual bool IsUndead (void) const { return false; } + // Get Functions + cAIComponent & GetAIComponent() { return *m_AI; } + cAttackComponent & GetAttackComponent() { return *m_Attack; } + cEnvironmentComponent & GetEnvironmentComponent() { return *m_Environment; } + cMovementComponent & GetMovementComponent() { return *m_Movement; } + // Get Functions - Temporary AString GetOwnerName (void) const { return m_OwnerName; } @@ -146,11 +157,6 @@ protected: AString m_SoundHurt; AString m_SoundDeath; - cAIComponent * m_AI; - cAttackComponent * m_Attack; - cEnvironmentComponent * m_Environment; - cMovementComponent * m_Movement; - // Temporary placement till I figure out where to put it float m_DropChanceWeapon; float m_DropChanceHelmet; |