mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 19:11:50 +00:00
Sky lights data saving (optimization)
This commit is contained in:
parent
6b423b441f
commit
a102821076
12 changed files with 147 additions and 38 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue