diff options
author | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-06-02 22:44:15 +0200 |
---|---|---|
committer | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-06-02 22:44:15 +0200 |
commit | a7c87e92ce35092f3abd1ea59ba15ea7cb369343 (patch) | |
tree | f694bc5f18b2d04f40cf3902c96a5c1862216760 /source/cChunkGenerator.cpp | |
parent | ClientHandle dumps the contents of all packets in the queue if the packet queue gets overloaded to the point of client-kicking. Use this to debug FS #197. (diff) | |
download | cuberite-a7c87e92ce35092f3abd1ea59ba15ea7cb369343.tar cuberite-a7c87e92ce35092f3abd1ea59ba15ea7cb369343.tar.gz cuberite-a7c87e92ce35092f3abd1ea59ba15ea7cb369343.tar.bz2 cuberite-a7c87e92ce35092f3abd1ea59ba15ea7cb369343.tar.lz cuberite-a7c87e92ce35092f3abd1ea59ba15ea7cb369343.tar.xz cuberite-a7c87e92ce35092f3abd1ea59ba15ea7cb369343.tar.zst cuberite-a7c87e92ce35092f3abd1ea59ba15ea7cb369343.zip |
Diffstat (limited to '')
-rw-r--r-- | source/cChunkGenerator.cpp | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/source/cChunkGenerator.cpp b/source/cChunkGenerator.cpp index 23d6b8422..31df6ba5d 100644 --- a/source/cChunkGenerator.cpp +++ b/source/cChunkGenerator.cpp @@ -251,19 +251,24 @@ void cChunkGenerator::InitCompositionGen(cIniFile & a_IniFile) }
else if (NoCaseCompare(CompoGenName, "debugbiomes") == 0)
{
- m_CompositionGen = new cCompoGenDebugBiomes(m_BiomeGen);
+ m_CompositionGen = new cCompoGenDebugBiomes;
}
- else
+ else if (NoCaseCompare(CompoGenName, "classic") == 0)
{
- if (NoCaseCompare(CompoGenName, "classic") != 0)
- {
- LOGWARN("Unknown CompositionGen \"%s\", using \"classic\" instead.", CompoGenName.c_str());
- }
int SeaLevel = a_IniFile.GetValueI("Generator", "ClassicSeaLevel", 60);
int BeachHeight = a_IniFile.GetValueI("Generator", "ClassicBeachHeight", 2);
int BeachDepth = a_IniFile.GetValueI("Generator", "ClassicBeachDepth", 4);
m_CompositionGen = new cCompoGenClassic(SeaLevel, BeachHeight, BeachDepth);
}
+ else
+ {
+ if (NoCaseCompare(CompoGenName, "biomal") != 0)
+ {
+ LOGWARN("Unknown CompositionGen \"%s\", using \"biomal\" instead.", CompoGenName.c_str());
+ }
+ int SeaLevel = a_IniFile.GetValueI("Generator", "BiomalSeaLevel", 62);
+ m_CompositionGen = new cCompoGenBiomal(m_Seed, SeaLevel);
+ }
}
@@ -461,7 +466,7 @@ void cChunkGenerator::DoGenerate(int a_ChunkX, int a_ChunkY, int a_ChunkZ) // Use the composed generator:
m_BiomeGen->GenBiomes(a_ChunkX, a_ChunkZ, BiomeMap);
m_HeightGen->GenHeightMap(a_ChunkX, a_ChunkZ, HeightMap);
- m_CompositionGen->ComposeTerrain(a_ChunkX, a_ChunkZ, BlockTypes, BlockMeta, HeightMap, Entities, BlockEntities);
+ m_CompositionGen->ComposeTerrain(a_ChunkX, a_ChunkZ, BlockTypes, BlockMeta, HeightMap, BiomeMap, Entities, BlockEntities);
for (cStructureGenList::iterator itr = m_StructureGens.begin(); itr != m_StructureGens.end(); ++itr)
{
(*itr)->GenStructures(a_ChunkX, a_ChunkZ, BlockTypes, BlockMeta, HeightMap, Entities, BlockEntities);
|