mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-08 12:31:51 +00:00
make chunk lightmap optional
This commit is contained in:
parent
64f7c19766
commit
5250c748be
12 changed files with 103 additions and 73 deletions
|
|
@ -175,11 +175,11 @@ void WorldRegions::put(Chunk* chunk, std::vector<ubyte> entitiesData) {
|
|||
CHUNK_DATA_LEN);
|
||||
|
||||
// Writing lights cache
|
||||
if (doWriteLights && chunk->flags.lighted) {
|
||||
if (doWriteLights && chunk->flags.lighted && chunk->lightmap) {
|
||||
put(chunk->x,
|
||||
chunk->z,
|
||||
REGION_LAYER_LIGHTS,
|
||||
chunk->lightmap.encode(),
|
||||
chunk->lightmap->encode(),
|
||||
LIGHTMAP_DATA_LEN);
|
||||
}
|
||||
// Writing block inventories
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue