summaryrefslogtreecommitdiffstats
path: root/src/MobSpawner.h
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2015-07-31 16:49:10 +0200
committerMattes D <github@xoft.cz>2015-07-31 16:49:10 +0200
commit6e4122e551eeb41d3e950b363dd837d5586fe560 (patch)
treeb5ee221d8a8e63c7d3b7868da1db19bf717a6ffd /src/MobSpawner.h
parentMerge pull request #2400 from cuberite/OffloadBadChunks (diff)
downloadcuberite-6e4122e551eeb41d3e950b363dd837d5586fe560.tar
cuberite-6e4122e551eeb41d3e950b363dd837d5586fe560.tar.gz
cuberite-6e4122e551eeb41d3e950b363dd837d5586fe560.tar.bz2
cuberite-6e4122e551eeb41d3e950b363dd837d5586fe560.tar.lz
cuberite-6e4122e551eeb41d3e950b363dd837d5586fe560.tar.xz
cuberite-6e4122e551eeb41d3e950b363dd837d5586fe560.tar.zst
cuberite-6e4122e551eeb41d3e950b363dd837d5586fe560.zip
Diffstat (limited to 'src/MobSpawner.h')
-rw-r--r--src/MobSpawner.h29
1 files changed, 14 insertions, 15 deletions
diff --git a/src/MobSpawner.h b/src/MobSpawner.h
index 8b651d6bf..3a2776df4 100644
--- a/src/MobSpawner.h
+++ b/src/MobSpawner.h
@@ -25,24 +25,23 @@ but it also has dynamic part depending on the world.ini settings.
class cMobSpawner
{
public :
- // constructor
- // a_MobFamily is the Family of mobs that this spawner will spawn
- // a_AllowedTypes is the set of types allowed for mobs it will spawn. Empty set
- // would result in no spawn at all
- // Allowed mobs thah are not of the right Family will not be include (no warning)
+ /** Constructor
+ a_MobFamily is the Family of mobs that this spawner will spawn
+ a_AllowedTypes is the set of types allowed for mobs it will spawn. Empty set would result in no spawn at all
+ Allowed mobs thah are not of the right Family will not be include (no warning). */
cMobSpawner(cMonster::eFamily MobFamily, const std::set<eMonsterType> & a_AllowedTypes);
- /// Check if specified block can be a Pack center for this spawner
+ /** Check if specified block can be a Pack center for this spawner */
bool CheckPackCenter(BLOCKTYPE a_BlockType);
- // Try to create a monster here
- // if this is the first of a Pack : determine the type of monster
- // BlockType & BlockMeta are used to decide what kind of Mob can Spawn here
- // MaxPackSize is set to the maximal size for a pack this type of mob
+ /** Try to create a monster here
+ If this is the first of a Pack, determine the type of monster
+ a_Biome, BlockType & BlockMeta are used to decide what kind of Mob can Spawn here
+ a_MaxPackSize is set to the maximal size for a pack this type of mob */
cMonster * TryToSpawnHere(cChunk * a_Chunk, int A_RelX, int a_RelY, int a_RelZ, EMCSBiome a_Biome, int & a_MaxPackSize);
- // mark the beginning of a new Pack
- // all mobs of the same Pack are the same type
+ /** Mark the beginning of a new Pack.
+ All mobs of the same Pack are the same type */
void NewPack(void);
// return true if there is at least one allowed type
@@ -55,11 +54,11 @@ public :
static bool CanSpawnHere(cChunk * a_Chunk, int a_RelX, int a_RelY, int a_RelZ, eMonsterType a_MobType, EMCSBiome a_Biome);
protected :
- // return a random type that can spawn on specified biome.
- // returns E_ENTITY_TYPE_DONOTUSE if none is possible
+ /** Returns a random type that can spawn in the specified biome.
+ Returns mtInvalidType if none is possible. */
eMonsterType ChooseMobType(EMCSBiome a_Biome);
- // add toAdd inside toAddIn, if toAdd is in m_AllowedTypes
+ /** Adds toAdd into toAddIn, if toAdd is in m_AllowedTypes */
void addIfAllowed(eMonsterType toAdd, std::set<eMonsterType> & toAddIn);
cMonster::eFamily m_MonsterFamily;