summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/Generating/FinishGen.cpp42
1 files changed, 6 insertions, 36 deletions
diff --git a/src/Generating/FinishGen.cpp b/src/Generating/FinishGen.cpp
index 898a9b268..b9d702429 100644
--- a/src/Generating/FinishGen.cpp
+++ b/src/Generating/FinishGen.cpp
@@ -417,42 +417,12 @@ void cFinishGenSoulsandRims::GenFinish(cChunkDesc & a_ChunkDesc)
continue;
}
- // Check how many blocks there are above the current block. Don't go higher than 2 blocks, because we already bail out if that's the case.
- int NumBlocksAbove = 0;
- for (int I = y + 1; I <= y + 2; I++)
- {
- if (a_ChunkDesc.GetBlockType(x, I, z) != E_BLOCK_AIR)
- {
- NumBlocksAbove++;
- }
- else
- {
- break;
- }
- }
-
- // There are too many blocks above the current block.
- if (NumBlocksAbove == 2)
- {
- continue;
- }
-
- // Check how many blocks there below the current block. Don't go lower than 2 blocks, because we already bail out if that's the case.
- int NumBlocksBelow = 0;
- for (int I = y - 1; I >= y - 2; I--)
- {
- if (a_ChunkDesc.GetBlockType(x, I, z) != E_BLOCK_AIR)
- {
- NumBlocksBelow++;
- }
- else
- {
- break;
- }
- }
-
- // There are too many blocks below the current block
- if (NumBlocksBelow == 2)
+ if (
+ ((a_ChunkDesc.GetBlockType(x, y + 1, z) != E_BLOCK_AIR) &&
+ ( a_ChunkDesc.GetBlockType(x, y + 2, z) != E_BLOCK_AIR)) ||
+ ((a_ChunkDesc.GetBlockType(x, y - 1, z) != E_BLOCK_AIR) &&
+ ( a_ChunkDesc.GetBlockType(x, y - 2, z) != E_BLOCK_AIR))
+ )
{
continue;
}