fix extra lights-related work in world.set_chunk_data

This commit is contained in:
MihailRis
2025-01-21 23:15:31 +03:00
parent b12982655d
commit 9c8e4e813c
2 changed files with 7 additions and 3 deletions
+2 -3
View File
@@ -148,12 +148,12 @@ static void integrate_chunk_client(Chunk& chunk) {
int x = chunk.x;
int z = chunk.z;
auto chunksController = controller->getChunksController();
Lighting& lighting = *chunksController->lighting;
chunk.flags.loadedLights = false;
chunk.flags.lighted = false;
chunk.lightmap.clear();
Lighting::prebuildSkyLight(chunk, *indices);
lighting.onChunkLoaded(x, z, true);
for (int lz = -1; lz <= 1; lz++) {
for (int lx = -1; lx <= 1; lx++) {
@@ -162,7 +162,6 @@ static void integrate_chunk_client(Chunk& chunk) {
}
if (auto other = level->chunks->getChunk(x + lx, z + lz)) {
other->flags.modified = true;
lighting.onChunkLoaded(x - 1, z, true);
}
}
}