fix newly created raycast bug

This commit is contained in:
MihailRis 2026-07-19 22:20:23 +03:00
parent 9d8d00209c
commit 46b4aab6dc

View file

@ -309,7 +309,9 @@ static inline voxel* raycast_blocks(
} else {
iend = {ix, iy, iz};
norm = {0, 0, 0};
norm[steppedIndex] = -step[steppedIndex];
if (steppedIndex != -1) {
norm[steppedIndex] = -step[steppedIndex];
}
return voxel;
}
}