Reversed wrong fix for #1517.
This commit is contained in:
parent
3f0d4fe250
commit
5ed6d280ce
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user