summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-03-31 18:48:52 +0200
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-03-31 18:48:52 +0200
commitf9d02b70fd8b1ea1011df306cd917394742105bd (patch)
tree0d29b2ea9e99c82438d63ef950e166700f6aef58 /source
parentMineShafts: Added staircases; added floors to mineshafts going through water (diff)
downloadcuberite-f9d02b70fd8b1ea1011df306cd917394742105bd.tar
cuberite-f9d02b70fd8b1ea1011df306cd917394742105bd.tar.gz
cuberite-f9d02b70fd8b1ea1011df306cd917394742105bd.tar.bz2
cuberite-f9d02b70fd8b1ea1011df306cd917394742105bd.tar.lz
cuberite-f9d02b70fd8b1ea1011df306cd917394742105bd.tar.xz
cuberite-f9d02b70fd8b1ea1011df306cd917394742105bd.tar.zst
cuberite-f9d02b70fd8b1ea1011df306cd917394742105bd.zip
Diffstat (limited to 'source')
-rw-r--r--source/Generating/MineShafts.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/source/Generating/MineShafts.cpp b/source/Generating/MineShafts.cpp
index 0fa95effc..0055a7516 100644
--- a/source/Generating/MineShafts.cpp
+++ b/source/Generating/MineShafts.cpp
@@ -884,7 +884,14 @@ cMineShaft * cMineShaftStaircase::CreateAndFit(
void cMineShaftStaircase::AppendBranches(int a_RecursionLevel, cNoise & a_Noise)
{
- // TODO
+ int Height = m_BoundingBox.p1.y + ((m_Slope == sDown) ? 1 : 5);
+ switch (m_Direction)
+ {
+ case dirXM: m_ParentSystem.AppendBranch(m_BoundingBox.p1.x - 1, Height, m_BoundingBox.p1.z + 1, dirXM, a_Noise, a_RecursionLevel); break;
+ case dirXP: m_ParentSystem.AppendBranch(m_BoundingBox.p2.x + 1, Height, m_BoundingBox.p1.z + 1, dirXP, a_Noise, a_RecursionLevel); break;
+ case dirZM: m_ParentSystem.AppendBranch(m_BoundingBox.p1.x + 1, Height, m_BoundingBox.p1.z - 1, dirZM, a_Noise, a_RecursionLevel); break;
+ case dirZP: m_ParentSystem.AppendBranch(m_BoundingBox.p1.x + 1, Height, m_BoundingBox.p2.z + 1, dirZP, a_Noise, a_RecursionLevel); break;
+ }
}