mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-06 11:31:49 +00:00
add chunk data validity check to world.set_chunk_data
This commit is contained in:
parent
1e851b05b4
commit
b00160eb26
3 changed files with 25 additions and 4 deletions
|
|
@ -5,6 +5,7 @@
|
|||
#include "api_lua.hpp"
|
||||
#include "assets/AssetsLoader.hpp"
|
||||
#include "coders/json.hpp"
|
||||
#include "content/Content.hpp"
|
||||
#include "engine/Engine.hpp"
|
||||
#include "files/WorldFiles.hpp"
|
||||
#include "files/engine_paths.hpp"
|
||||
|
|
@ -181,7 +182,7 @@ static int l_set_chunk_data(lua::State* L) {
|
|||
return lua::pushboolean(L, false);
|
||||
}
|
||||
compressed_chunks::decode(
|
||||
*chunk, buffer.data(), buffer.size()
|
||||
*chunk, buffer.data(), buffer.size(), *content->getIndices()
|
||||
);
|
||||
if (controller->getChunksController()->lighting == nullptr) {
|
||||
return lua::pushboolean(L, true);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue