diff options
author | Julian Laubstein <julianlaubstein@yahoo.de> | 2015-07-31 19:26:33 +0200 |
---|---|---|
committer | Julian Laubstein <julianlaubstein@yahoo.de> | 2015-07-31 19:26:33 +0200 |
commit | d19cde93fa3344f318fb0d4ffbf5bb0397a51a75 (patch) | |
tree | b5ee221d8a8e63c7d3b7868da1db19bf717a6ffd /src/MobSpawner.h | |
parent | Merge pull request #2400 from cuberite/OffloadBadChunks (diff) | |
parent | Unified the doxy-comment format. (diff) | |
download | cuberite-d19cde93fa3344f318fb0d4ffbf5bb0397a51a75.tar cuberite-d19cde93fa3344f318fb0d4ffbf5bb0397a51a75.tar.gz cuberite-d19cde93fa3344f318fb0d4ffbf5bb0397a51a75.tar.bz2 cuberite-d19cde93fa3344f318fb0d4ffbf5bb0397a51a75.tar.lz cuberite-d19cde93fa3344f318fb0d4ffbf5bb0397a51a75.tar.xz cuberite-d19cde93fa3344f318fb0d4ffbf5bb0397a51a75.tar.zst cuberite-d19cde93fa3344f318fb0d4ffbf5bb0397a51a75.zip |
Diffstat (limited to 'src/MobSpawner.h')
-rw-r--r-- | src/MobSpawner.h | 29 |
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; |