diff --git a/client/source/world/ClientChunk.cpp b/client/source/world/ClientChunk.cpp index 5c19f74e..51fd6787 100644 --- a/client/source/world/ClientChunk.cpp +++ b/client/source/world/ClientChunk.cpp @@ -26,8 +26,7 @@ #include "TextureAtlas.hpp" void ClientChunk::update() { - bool lightUpdated = m_lightmap.updateLights(); - if (lightUpdated || m_hasChanged || m_hasLightChanged) { + if (m_lightmap.updateLights() || m_hasChanged || m_hasLightChanged) { m_hasChanged = false; m_hasLightChanged = false; diff --git a/server/source/world/TerrainGenerator.cpp b/server/source/world/TerrainGenerator.cpp index 504d00a1..07df7170 100644 --- a/server/source/world/TerrainGenerator.cpp +++ b/server/source/world/TerrainGenerator.cpp @@ -86,6 +86,9 @@ void TerrainGenerator::fastNoiseGeneration(ServerChunk &chunk) const { for(int iz = -3 ; iz <= 3 ; iz++) { if(ix * ix + iy * iy + iz * iz < 8 + (rand() & 1) && !chunk.getBlock(x + ix, y + h + iy, z + iz)) { chunk.setBlockRaw(x + ix, y + h + iy, z + iz, m_leavesBlockID); + + // FIXME: This is a temporary fix for the second part of #41 + chunk.lightmap().setSunlight(x + ix, y + h + iy, z + iz, 0); } } }