summaryrefslogtreecommitdiffstats
path: root/source/cWorld.cpp
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-07-15 15:33:43 +0200
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-07-15 15:33:43 +0200
commiteddc360bd7f82aa8e45d1ff2c9de5a3767dea782 (patch)
tree04d589ea268bd3be1efb560e344dd4fd7b0efe39 /source/cWorld.cpp
parentSquirrel: removed CLR from dependencies (we're not in C#) (diff)
downloadcuberite-eddc360bd7f82aa8e45d1ff2c9de5a3767dea782.tar
cuberite-eddc360bd7f82aa8e45d1ff2c9de5a3767dea782.tar.gz
cuberite-eddc360bd7f82aa8e45d1ff2c9de5a3767dea782.tar.bz2
cuberite-eddc360bd7f82aa8e45d1ff2c9de5a3767dea782.tar.lz
cuberite-eddc360bd7f82aa8e45d1ff2c9de5a3767dea782.tar.xz
cuberite-eddc360bd7f82aa8e45d1ff2c9de5a3767dea782.tar.zst
cuberite-eddc360bd7f82aa8e45d1ff2c9de5a3767dea782.zip
Diffstat (limited to '')
-rw-r--r--source/cWorld.cpp23
1 files changed, 13 insertions, 10 deletions
diff --git a/source/cWorld.cpp b/source/cWorld.cpp
index 9531e23c3..187642242 100644
--- a/source/cWorld.cpp
+++ b/source/cWorld.cpp
@@ -868,16 +868,17 @@ void cWorld::GrowTree( int a_X, int a_Y, int a_Z )
void cWorld::GrowTreeFromSapling(int a_X, int a_Y, int a_Z, char a_SaplingMeta)
{
cNoise Noise(m_Generator.GetSeed());
- sSetBlockVector Blocks;
+ sSetBlockVector Logs, Other;
switch (a_SaplingMeta & 0x07)
{
- case E_META_SAPLING_APPLE: GetAppleTreeImage (a_X, a_Y, a_Z, Noise, (int)(m_WorldTime & 0xffffffff), Blocks); break;
- case E_META_SAPLING_BIRCH: GetBirchTreeImage (a_X, a_Y, a_Z, Noise, (int)(m_WorldTime & 0xffffffff), Blocks); break;
- case E_META_SAPLING_CONIFER: GetConiferTreeImage(a_X, a_Y, a_Z, Noise, (int)(m_WorldTime & 0xffffffff), Blocks); break;
- case E_META_SAPLING_JUNGLE: GetJungleTreeImage (a_X, a_Y, a_Z, Noise, (int)(m_WorldTime & 0xffffffff), Blocks); break;
+ case E_META_SAPLING_APPLE: GetAppleTreeImage (a_X, a_Y, a_Z, Noise, (int)(m_WorldTime & 0xffffffff), Logs, Other); break;
+ case E_META_SAPLING_BIRCH: GetBirchTreeImage (a_X, a_Y, a_Z, Noise, (int)(m_WorldTime & 0xffffffff), Logs, Other); break;
+ case E_META_SAPLING_CONIFER: GetConiferTreeImage(a_X, a_Y, a_Z, Noise, (int)(m_WorldTime & 0xffffffff), Logs, Other); break;
+ case E_META_SAPLING_JUNGLE: GetJungleTreeImage (a_X, a_Y, a_Z, Noise, (int)(m_WorldTime & 0xffffffff), Logs, Other); break;
}
-
- GrowTreeImage(Blocks);
+ Other.insert(Other.begin(), Logs.begin(), Logs.end());
+ Logs.clear();
+ GrowTreeImage(Logs);
}
@@ -887,9 +888,11 @@ void cWorld::GrowTreeFromSapling(int a_X, int a_Y, int a_Z, char a_SaplingMeta)
void cWorld::GrowTreeByBiome(int a_X, int a_Y, int a_Z)
{
cNoise Noise(m_Generator.GetSeed());
- sSetBlockVector Blocks;
- GetTreeImageByBiome(a_X, a_Y, a_Z, Noise, (int)(m_WorldTime & 0xffffffff), (EMCSBiome)GetBiomeAt(a_X, a_Z), Blocks);
- GrowTreeImage(Blocks);
+ sSetBlockVector Logs, Other;
+ GetTreeImageByBiome(a_X, a_Y, a_Z, Noise, (int)(m_WorldTime & 0xffffffff), (EMCSBiome)GetBiomeAt(a_X, a_Z), Logs, Other);
+ Other.insert(Other.begin(), Logs.begin(), Logs.end());
+ Logs.clear();
+ GrowTreeImage(Other);
}