summaryrefslogtreecommitdiffstats
path: root/src/Generating/FinishGen.h
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2014-12-05 22:46:46 +0100
committerMattes D <github@xoft.cz>2014-12-05 22:46:46 +0100
commitc5dc5ac45f19aac55f99629603cfaf81ac3d0b10 (patch)
tree7228790af86b4b0ba08ab31e0fbd9709495eb66f /src/Generating/FinishGen.h
parentMerge pull request #1642 from p-mcgowan/animalTerrainFinisher (diff)
downloadcuberite-c5dc5ac45f19aac55f99629603cfaf81ac3d0b10.tar
cuberite-c5dc5ac45f19aac55f99629603cfaf81ac3d0b10.tar.gz
cuberite-c5dc5ac45f19aac55f99629603cfaf81ac3d0b10.tar.bz2
cuberite-c5dc5ac45f19aac55f99629603cfaf81ac3d0b10.tar.lz
cuberite-c5dc5ac45f19aac55f99629603cfaf81ac3d0b10.tar.xz
cuberite-c5dc5ac45f19aac55f99629603cfaf81ac3d0b10.tar.zst
cuberite-c5dc5ac45f19aac55f99629603cfaf81ac3d0b10.zip
Diffstat (limited to 'src/Generating/FinishGen.h')
-rw-r--r--src/Generating/FinishGen.h18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/Generating/FinishGen.h b/src/Generating/FinishGen.h
index 8305908c0..ae6dee590 100644
--- a/src/Generating/FinishGen.h
+++ b/src/Generating/FinishGen.h
@@ -312,7 +312,7 @@ protected:
// cFinishGen override:
virtual void GenFinish(cChunkDesc & a_ChunkDesc) override;
- // Tries to place a spring at the specified coords, checks neighbors. Returns true if successful
+ /** Tries to place a spring at the specified coords, checks neighbors. Returns true if successful. */
bool TryPlaceSpring(cChunkDesc & a_ChunkDesc, int x, int y, int z);
} ;
@@ -321,8 +321,7 @@ protected:
/** This class populates generated chunks with packs of biome-dependant animals
- Animals: cows, sheep, pigs, mooshrooms, squid, horses, wolves, ocelots
- */
+Animals: cows, sheep, pigs, mooshrooms, squid, horses, wolves, ocelots */
class cFinishGenPassiveMobs :
public cFinishGen
{
@@ -332,16 +331,21 @@ public:
protected:
- cNoise m_Noise;
- int m_AnimalProbability; // Chance, [0..100], that an animal pack will be generated in a chunk
+ /** The noise used as the source of randomness */
+ cNoise m_Noise;
+
+ /** Chance, [0..100], that an animal pack will be generated in a chunk */
+ int m_AnimalProbability;
+
// cFinishGen override:
virtual void GenFinish(cChunkDesc & a_ChunkDesc) override;
- // Returns false if an animal cannot spawn at given coords, else adds it to the chunk's entity list and returns true
+ /** Returns false if an animal cannot spawn at given coords, else adds it to the chunk's entity list and returns true */
bool TrySpawnAnimals(cChunkDesc & a_ChunkDesc, int x, int y, int z, eMonsterType AnimalToSpawn);
- // Gets a random animal from biome-dependant list
+ /** Picks a random animal from biome-dependant list for a random position in the chunk.
+ Returns the chosen mob type, or mtInvalid if no mob chosen. */
eMonsterType GetRandomMob(cChunkDesc & a_ChunkDesc);
} ;