diff options
author | tycho <work.tycho@gmail.com> | 2015-05-19 14:34:52 +0200 |
---|---|---|
committer | tycho <work.tycho@gmail.com> | 2015-05-19 14:34:52 +0200 |
commit | 03c75943ead4d7fe12a07bbdea18b87f85879b0f (patch) | |
tree | a3b26e81403894335a5a18e299b9abd252aa7cc4 /src/Generating/MineShafts.cpp | |
parent | Properly fix cFile Warnings (diff) | |
download | cuberite-03c75943ead4d7fe12a07bbdea18b87f85879b0f.tar cuberite-03c75943ead4d7fe12a07bbdea18b87f85879b0f.tar.gz cuberite-03c75943ead4d7fe12a07bbdea18b87f85879b0f.tar.bz2 cuberite-03c75943ead4d7fe12a07bbdea18b87f85879b0f.tar.lz cuberite-03c75943ead4d7fe12a07bbdea18b87f85879b0f.tar.xz cuberite-03c75943ead4d7fe12a07bbdea18b87f85879b0f.tar.zst cuberite-03c75943ead4d7fe12a07bbdea18b87f85879b0f.zip |
Diffstat (limited to 'src/Generating/MineShafts.cpp')
-rw-r--r-- | src/Generating/MineShafts.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/Generating/MineShafts.cpp b/src/Generating/MineShafts.cpp index 61f29b762..1482234f0 100644 --- a/src/Generating/MineShafts.cpp +++ b/src/Generating/MineShafts.cpp @@ -564,14 +564,14 @@ cMineShaft * cMineShaftCorridor::CreateAndFit( void cMineShaftCorridor::AppendBranches(int a_RecursionLevel, cNoise & a_Noise) { - int rnd = a_Noise.IntNoise3DInt(m_BoundingBox.p1.x, m_BoundingBox.p1.y + a_RecursionLevel, m_BoundingBox.p1.z) / 7; + int Outerrnd = a_Noise.IntNoise3DInt(m_BoundingBox.p1.x, m_BoundingBox.p1.y + a_RecursionLevel, m_BoundingBox.p1.z) / 7; // Prefer the same height, but allow for up to one block height displacement: - int Height = m_BoundingBox.p1.y + ((rnd % 4) + ((rnd >> 3) % 3)) / 2; + int OuterHeight = m_BoundingBox.p1.y + ((Outerrnd % 4) + ((Outerrnd >> 3) % 3)) / 2; switch (m_Direction) { case dirXM: { - m_ParentSystem.AppendBranch(m_BoundingBox.p1.x - 1, Height, m_BoundingBox.p1.z + 1, dirXM, a_Noise, a_RecursionLevel); + m_ParentSystem.AppendBranch(m_BoundingBox.p1.x - 1, OuterHeight, m_BoundingBox.p1.z + 1, dirXM, a_Noise, a_RecursionLevel); for (int i = m_NumSegments; i >= 0; i--) { int rnd = a_Noise.IntNoise3DInt(m_BoundingBox.p1.x + i + 10, m_BoundingBox.p1.y + a_RecursionLevel, m_BoundingBox.p1.z) / 11; @@ -586,7 +586,7 @@ void cMineShaftCorridor::AppendBranches(int a_RecursionLevel, cNoise & a_Noise) case dirXP: { - m_ParentSystem.AppendBranch(m_BoundingBox.p2.x + 1, Height, m_BoundingBox.p1.z + 1, dirXP, a_Noise, a_RecursionLevel); + m_ParentSystem.AppendBranch(m_BoundingBox.p2.x + 1, OuterHeight, m_BoundingBox.p1.z + 1, dirXP, a_Noise, a_RecursionLevel); for (int i = m_NumSegments; i >= 0; i--) { int rnd = a_Noise.IntNoise3DInt(m_BoundingBox.p1.x + i + 10, m_BoundingBox.p1.y + a_RecursionLevel, m_BoundingBox.p1.z) / 11; @@ -601,7 +601,7 @@ void cMineShaftCorridor::AppendBranches(int a_RecursionLevel, cNoise & a_Noise) case dirZM: { - m_ParentSystem.AppendBranch(m_BoundingBox.p1.x + 1, Height, m_BoundingBox.p1.z - 1, dirZM, a_Noise, a_RecursionLevel); + m_ParentSystem.AppendBranch(m_BoundingBox.p1.x + 1, OuterHeight, m_BoundingBox.p1.z - 1, dirZM, a_Noise, a_RecursionLevel); for (int i = m_NumSegments; i >= 0; i--) { int rnd = a_Noise.IntNoise3DInt(m_BoundingBox.p1.x + i + 10, m_BoundingBox.p1.y + a_RecursionLevel, m_BoundingBox.p1.z) / 11; @@ -616,7 +616,7 @@ void cMineShaftCorridor::AppendBranches(int a_RecursionLevel, cNoise & a_Noise) case dirZP: { - m_ParentSystem.AppendBranch(m_BoundingBox.p1.x + 1, Height, m_BoundingBox.p2.z + 1, dirZP, a_Noise, a_RecursionLevel); + m_ParentSystem.AppendBranch(m_BoundingBox.p1.x + 1, OuterHeight, m_BoundingBox.p2.z + 1, dirZP, a_Noise, a_RecursionLevel); for (int i = m_NumSegments; i >= 0; i--) { int rnd = a_Noise.IntNoise3DInt(m_BoundingBox.p1.x + i + 10, m_BoundingBox.p1.y + a_RecursionLevel, m_BoundingBox.p1.z) / 11; |