From f9d02b70fd8b1ea1011df306cd917394742105bd Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Sun, 31 Mar 2013 16:48:52 +0000 Subject: MineShafts: Staircases have further connections behind them. git-svn-id: http://mc-server.googlecode.com/svn/trunk@1335 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/Generating/MineShafts.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'source/Generating') 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; + } } -- cgit v1.2.3