summaryrefslogtreecommitdiffstats
path: root/source/Mobs/Monster.h
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-12-22 10:39:13 +0100
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-12-22 10:39:13 +0100
commitaebe130299a3c3d14a0d89e68195c303ca120c1b (patch)
tree7f4342e9556da307c1ebea5b802961c4f60f79d5 /source/Mobs/Monster.h
parentFixed linux compilation (diff)
downloadcuberite-aebe130299a3c3d14a0d89e68195c303ca120c1b.tar
cuberite-aebe130299a3c3d14a0d89e68195c303ca120c1b.tar.gz
cuberite-aebe130299a3c3d14a0d89e68195c303ca120c1b.tar.bz2
cuberite-aebe130299a3c3d14a0d89e68195c303ca120c1b.tar.lz
cuberite-aebe130299a3c3d14a0d89e68195c303ca120c1b.tar.xz
cuberite-aebe130299a3c3d14a0d89e68195c303ca120c1b.tar.zst
cuberite-aebe130299a3c3d14a0d89e68195c303ca120c1b.zip
Diffstat (limited to '')
-rw-r--r--source/Mobs/Monster.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/source/Mobs/Monster.h b/source/Mobs/Monster.h
index 2c26045ff..066f17495 100644
--- a/source/Mobs/Monster.h
+++ b/source/Mobs/Monster.h
@@ -25,7 +25,12 @@ class cMonster :
public:
// tolua_end
- cMonster(void);
+ /** Creates the mob object.
+ * If a_ConfigName is not empty, the configuration is loaded using GetMonsterConfig()
+ * a_ProtocolMobType is the ID of the mob used in the protocol ( http://wiki.vg/Entities#Mobs , 2012_12_22)
+ * a_SoundHurt and a_SoundDeath are assigned into m_SoundHurt and m_SoundDeath, respectively
+ */
+ cMonster(const AString & a_ConfigName, char a_ProtocolMobType, const AString & a_SoundHurt, const AString & a_SoundDeath);
CLASS_PROTODEF(cMonster);
@@ -52,7 +57,10 @@ public:
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 void GetMonsterConfig(const char* pm_name);
+
+ /// Reads the monster configuration for the specified monster name and assigns it to this object.
+ void GetMonsterConfig(const AString & a_Name);
+
virtual void EventLosePlayer();
virtual void CheckEventLostPlayer();