diff options
author | Mattes D <github@xoft.cz> | 2020-04-03 08:57:01 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-03 08:57:01 +0200 |
commit | 01b8ed5295875262a91b60af878bf2a18c1b7aae (patch) | |
tree | 52171974791a7529a3a69f9fe20d906158765954 /src/LightingThread.h | |
parent | Update Core (diff) | |
download | cuberite-01b8ed5295875262a91b60af878bf2a18c1b7aae.tar cuberite-01b8ed5295875262a91b60af878bf2a18c1b7aae.tar.gz cuberite-01b8ed5295875262a91b60af878bf2a18c1b7aae.tar.bz2 cuberite-01b8ed5295875262a91b60af878bf2a18c1b7aae.tar.lz cuberite-01b8ed5295875262a91b60af878bf2a18c1b7aae.tar.xz cuberite-01b8ed5295875262a91b60af878bf2a18c1b7aae.tar.zst cuberite-01b8ed5295875262a91b60af878bf2a18c1b7aae.zip |
Diffstat (limited to '')
-rw-r--r-- | src/LightingThread.h | 21 |
1 files changed, 2 insertions, 19 deletions
diff --git a/src/LightingThread.h b/src/LightingThread.h index 6c27ff7ba..4e009fd0c 100644 --- a/src/LightingThread.h +++ b/src/LightingThread.h @@ -159,28 +159,11 @@ protected: /** Compresses from 1-block-per-byte (faster calc) into 2-blocks-per-byte (MC storage): */ void CompressLight(NIBBLETYPE * a_LightArray, NIBBLETYPE * a_ChunkLight); - inline void PropagateLight( + void PropagateLight( NIBBLETYPE * a_Light, unsigned int a_SrcIdx, unsigned int a_DstIdx, size_t & a_NumSeedsOut, unsigned char * a_IsSeedOut, unsigned int * a_SeedIdxOut - ) - { - ASSERT(a_SrcIdx < ARRAYCOUNT(m_SkyLight)); - ASSERT(a_DstIdx < ARRAYCOUNT(m_BlockTypes)); - - if (a_Light[a_SrcIdx] <= a_Light[a_DstIdx] + cBlockInfo::GetSpreadLightFalloff(m_BlockTypes[a_DstIdx])) - { - // We're not offering more light than the dest block already has - return; - } - - a_Light[a_DstIdx] = a_Light[a_SrcIdx] - cBlockInfo::GetSpreadLightFalloff(m_BlockTypes[a_DstIdx]); - if (!a_IsSeedOut[a_DstIdx]) - { - a_IsSeedOut[a_DstIdx] = true; - a_SeedIdxOut[a_NumSeedsOut++] = a_DstIdx; - } - } + ); /** Queues a chunkstay that has all of its chunks loaded. Called by cLightingChunkStay when all of its chunks are loaded. */ |