mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-07 03:51:50 +00:00
improve blocks.set performance
This commit is contained in:
parent
73f589d479
commit
6af74fc219
6 changed files with 18 additions and 14 deletions
|
|
@ -14,6 +14,7 @@ Chunk::Chunk(int xpos, int zpos) : x(xpos), z(zpos) {
|
|||
}
|
||||
|
||||
void Chunk::updateHeights() {
|
||||
flags.dirtyHeights = false;
|
||||
for (uint i = 0; i < CHUNK_VOL; i++) {
|
||||
if (voxels[i].id != 0) {
|
||||
bottom = i / (CHUNK_D * CHUNK_W);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue