From 0e99d44f0339dd471254f6b53fd6f030686db770 Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Sat, 21 Jul 2012 17:07:46 +0000 Subject: Added a (disabled) debugging code for anvil underground overviewing, useful for exploring MC cave generation style git-svn-id: http://mc-server.googlecode.com/svn/trunk@690 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/WSSAnvil.cpp | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'source') diff --git a/source/WSSAnvil.cpp b/source/WSSAnvil.cpp index 14cea81f0..ac755907a 100644 --- a/source/WSSAnvil.cpp +++ b/source/WSSAnvil.cpp @@ -480,16 +480,27 @@ bool cWSSAnvil::LoadChunkFromNBT(const cChunkCoords & a_Chunk, const cParsedNBT int Index = cChunkDef::MakeIndexNoCheck(x, y, z); if (ShouldInvert[x + cChunkDef::Width * z]) { - ChunkData[Index] = (ChunkData[Index] == E_BLOCK_AIR) ? E_BLOCK_STONE : E_BLOCK_AIR; + BlockTypes[Index] = (BlockTypes[Index] == E_BLOCK_AIR) ? E_BLOCK_STONE : E_BLOCK_AIR; } else { - ShouldInvert[x + cChunkDef::Width * z] = (ChunkData[Index] != E_BLOCK_AIR); + switch (BlockTypes[Index]) + { + case E_BLOCK_AIR: + case E_BLOCK_LEAVES: + { + // nothing needed + break; + } + default: + { + ShouldInvert[x + cChunkDef::Width * z] = true; + } + } + BlockTypes[Index] = E_BLOCK_AIR; } } } // for y - // Set everything alight, so that we can see: - memset(ChunkData + cChunkDef::SkyLightOffset, 0xff, cChunkDef::NumBlocks / 2); //*/ m_World->SetChunkData( -- cgit v1.2.3