Sky lights data saving (optimization)

This commit is contained in:
MihailRis
2023-12-06 16:15:44 +03:00
parent 6b423b441f
commit a102821076
12 changed files with 147 additions and 38 deletions
+6
View File
@@ -50,6 +50,12 @@ std::shared_ptr<Chunk> ChunksStorage::create(int x, int z) {
chunk->decode(data.get());
chunk->setLoaded(true);
}
light_t* lights = level->world->wfile->getLights(chunk->x, chunk->z);
if (lights) {
chunk->lightmap->set(lights);
chunk->setLoadedLights(true);
}
return chunk;
}