improve blocks.set performance

This commit is contained in:
MihailRis
2025-08-16 12:48:42 +03:00
parent 73f589d479
commit 6af74fc219
6 changed files with 18 additions and 14 deletions
+1
View File
@@ -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);