summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSTRWarrior <niels.breuker@hotmail.nl>2014-10-16 10:26:17 +0200
committerSTRWarrior <niels.breuker@hotmail.nl>2014-10-16 10:26:17 +0200
commit5ed6d280ce5d199f8b319429e281c0ed48b82af8 (patch)
treed143b9687acc4d88ab98387dbd11a79ff5a3a3bf
parentReversed the order of the loot (diff)
downloadcuberite-5ed6d280ce5d199f8b319429e281c0ed48b82af8.tar
cuberite-5ed6d280ce5d199f8b319429e281c0ed48b82af8.tar.gz
cuberite-5ed6d280ce5d199f8b319429e281c0ed48b82af8.tar.bz2
cuberite-5ed6d280ce5d199f8b319429e281c0ed48b82af8.tar.lz
cuberite-5ed6d280ce5d199f8b319429e281c0ed48b82af8.tar.xz
cuberite-5ed6d280ce5d199f8b319429e281c0ed48b82af8.tar.zst
cuberite-5ed6d280ce5d199f8b319429e281c0ed48b82af8.zip
-rw-r--r--src/Generating/DungeonRoomsFinisher.cpp10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/Generating/DungeonRoomsFinisher.cpp b/src/Generating/DungeonRoomsFinisher.cpp
index 68c040fbe..492bae129 100644
--- a/src/Generating/DungeonRoomsFinisher.cpp
+++ b/src/Generating/DungeonRoomsFinisher.cpp
@@ -210,9 +210,6 @@ protected:
// cGridStructGen::cStructure override:
virtual void DrawIntoChunk(cChunkDesc & a_ChunkDesc) override
{
- int CenterX = (m_StartX + m_EndX) / 2 - a_ChunkDesc.GetChunkX() * cChunkDef::Width;
- int CenterZ = (m_StartZ + m_EndZ) / 2 - a_ChunkDesc.GetChunkZ() * cChunkDef::Width;
-
if (
(m_EndX < a_ChunkDesc.GetChunkX() * cChunkDef::Width) ||
(m_StartX >= a_ChunkDesc.GetChunkX() * cChunkDef::Width + cChunkDef::Width) ||
@@ -224,11 +221,6 @@ protected:
return;
}
- if (!cBlockInfo::CanBeTerraformed(a_ChunkDesc.GetBlockType(CenterX, m_FloorHeight + 1, CenterZ)))
- {
- return;
- }
-
int b = m_FloorHeight + 1; // Bottom
int t = m_FloorHeight + 1 + ROOM_HEIGHT; // Top
ReplaceCuboidRandom(a_ChunkDesc, m_StartX, m_FloorHeight, m_StartZ, m_EndX + 1, b, m_EndZ + 1, E_BLOCK_MOSSY_COBBLESTONE, E_BLOCK_COBBLESTONE); // Floor
@@ -245,6 +237,8 @@ protected:
TryPlaceChest(a_ChunkDesc, m_Chest2);
// Place the spawner:
+ int CenterX = (m_StartX + m_EndX) / 2 - a_ChunkDesc.GetChunkX() * cChunkDef::Width;
+ int CenterZ = (m_StartZ + m_EndZ) / 2 - a_ChunkDesc.GetChunkZ() * cChunkDef::Width;
if (
(CenterX >= 0) && (CenterX < cChunkDef::Width) &&
(CenterZ >= 0) && (CenterZ < cChunkDef::Width)