mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
used 'closes' chunks in ChunksLoader lights calculations
This commit is contained in:
parent
4651ab776b
commit
4c2fd0fce2
1 changed files with 9 additions and 1 deletions
|
|
@ -18,6 +18,13 @@ void ChunksLoader::_thread(){
|
|||
}
|
||||
Chunk* chunk = current;
|
||||
chunk->incref();
|
||||
for (size_t i = 0; i < 27; i++){
|
||||
Chunk* other = closes[i];
|
||||
if (other){
|
||||
other->incref();
|
||||
chunks.putChunk(other);
|
||||
}
|
||||
}
|
||||
|
||||
chunks._setOffset(chunk->x-1, chunk->y-1, chunk->z-1);
|
||||
|
||||
|
|
@ -30,7 +37,8 @@ void ChunksLoader::_thread(){
|
|||
chunks.clear(false);
|
||||
for (int i = 0; i < 27; i++){
|
||||
Chunk* other = closes[i];
|
||||
//delete other;
|
||||
if (other)
|
||||
other->decref();
|
||||
}
|
||||
chunk->ready = true;
|
||||
current = nullptr;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue