mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
fix
This commit is contained in:
parent
0e83ee0a85
commit
fe210708e5
1 changed files with 5 additions and 3 deletions
|
|
@ -206,16 +206,18 @@ static int l_set_chunk_data(lua::State* L) {
|
|||
chunk->decode(buffer->data().data());
|
||||
}
|
||||
|
||||
chunk->setModifiedAndUnsaved();
|
||||
chunk->updateHeights();
|
||||
|
||||
auto chunksController = controller->getChunksController();
|
||||
if (chunksController->lighting == nullptr) {
|
||||
return lua::pushboolean(L, true);
|
||||
}
|
||||
|
||||
Lighting& lighting = *chunksController->lighting;
|
||||
chunk->updateHeights();
|
||||
chunk->flags.loadedLights = false;
|
||||
chunk->flags.lighted = false;
|
||||
chunk->setModifiedAndUnsaved();
|
||||
|
||||
Lighting::prebuildSkyLight(*chunk, *indices);
|
||||
lighting.onChunkLoaded(x, y, true);
|
||||
|
||||
|
|
@ -226,7 +228,7 @@ static int l_set_chunk_data(lua::State* L) {
|
|||
}
|
||||
chunk = level->chunks->getChunk(x + lx, y + lz);
|
||||
if (chunk != nullptr) {
|
||||
chunk->setModifiedAndUnsaved();
|
||||
chunk->flags.modified = true;
|
||||
lighting.onChunkLoaded(x - 1, y, true);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue