From 1e350218ccb73a5609db9dd844dc25ed9b1a8286 Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Sun, 5 May 2013 14:48:18 +0000 Subject: Lighting: Fixed underwater lighting (FS #369) git-svn-id: http://mc-server.googlecode.com/svn/trunk@1444 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/WorldStorage/WSSAnvil.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'source/WorldStorage') diff --git a/source/WorldStorage/WSSAnvil.cpp b/source/WorldStorage/WSSAnvil.cpp index 234ddbd20..2af36b1ad 100644 --- a/source/WorldStorage/WSSAnvil.cpp +++ b/source/WorldStorage/WSSAnvil.cpp @@ -29,6 +29,11 @@ +/** If defined, the BlockSkyLight values will be copied over to BlockLight upon chunk saving, +thus making skylight visible in Minutor's Lighting mode +*/ +// #define DEBUG_SKYLIGHT + /** Maximum number of MCA files that are cached in memory. Since only the header is actually in the memory, this number can be high, but still, each file means an OS FS handle. */ @@ -416,7 +421,11 @@ bool cWSSAnvil::SaveChunkToNBT(const cChunkCoords & a_Chunk, cFastNBTWriter & a_ int SliceSizeNibble = SliceSizeBlock / 2; const char * BlockTypes = (const char *)(Serializer.m_BlockTypes); const char * BlockMetas = (const char *)(Serializer.m_BlockMetas); - const char * BlockLight = (const char *)(Serializer.m_BlockLight); + #ifdef DEBUG_SKYLIGHT + const char * BlockLight = (const char *)(Serializer.m_BlockSkyLight); + #else + const char * BlockLight = (const char *)(Serializer.m_BlockLight); + #endif const char * BlockSkyLight = (const char *)(Serializer.m_BlockSkyLight); for (int Y = 0; Y < 16; Y++) { -- cgit v1.2.3