From: Daniel Karbach Date: Thu, 15 Oct 2015 13:41:31 +0000 (+0200) Subject: invalidate meshes if surrounding chunks on insert X-Git-Url: http://git.localhorst.tv/?a=commitdiff_plain;ds=sidebyside;h=4e3afb4c7631591b80cb7740a9b6f46da69b7ae4;p=blank.git invalidate meshes if surrounding chunks on insert this should fix the dark seams on chunk borders --- diff --git a/src/world/chunk.cpp b/src/world/chunk.cpp index 800012e..f819ef9 100644 --- a/src/world/chunk.cpp +++ b/src/world/chunk.cpp @@ -636,9 +636,13 @@ bool ChunkLoader::LoadOne() { for (iter.x = begin.x; iter.x < end.x; ++iter.x) { if (index->IsBorder(iter)) continue; Chunk *light_chunk = index->Get(iter); - if (!light_chunk || light_chunk->Lighted()) continue; + if (!light_chunk) continue; if (index->HasAllSurrounding(iter)) { - light_chunk->ScanLights(); + if (!light_chunk->Lighted()) { + light_chunk->ScanLights(); + } else { + light_chunk->InvalidateMesh(); + } } } }