[TerrainGenerator] Temporary fix for #41.

This commit is contained in:
Quentin Bazin 2020-02-15 19:09:59 +09:00
parent 7793e2ee71
commit c6522336ea
2 changed files with 4 additions and 2 deletions

View File

@ -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;

View File

@ -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);
}
}
}