From 597bdd9f8010c455c1c4ce83dc2ed5e227666a1c Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Sun, 30 Mar 2014 00:12:19 +0100 Subject: NetherForts have a minimum number of pieces. The fort will generate a different image if it has less than the minimum; the max depth affects the minimum number of pieces. --- src/Generating/NetherFortGen.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/Generating') diff --git a/src/Generating/NetherFortGen.cpp b/src/Generating/NetherFortGen.cpp index d111c7cee..09c992e22 100644 --- a/src/Generating/NetherFortGen.cpp +++ b/src/Generating/NetherFortGen.cpp @@ -41,8 +41,11 @@ public: int BlockY = 64; // Generate pieces: - cBFSPieceGenerator pg(m_ParentGen, a_Seed); - pg.PlacePieces(a_BlockX, BlockY, a_BlockZ, a_MaxDepth, m_Pieces); + for (int i = 0; m_Pieces.size() < (size_t)(a_MaxDepth * a_MaxDepth / 16 + a_MaxDepth); i++) + { + cBFSPieceGenerator pg(m_ParentGen, a_Seed + 1); + pg.PlacePieces(a_BlockX, BlockY, a_BlockZ, a_MaxDepth, m_Pieces); + } } -- cgit v1.2.3