mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-08 12:31:51 +00:00
add core:struct_air
This commit is contained in:
parent
0cbc048523
commit
a47b650591
5 changed files with 28 additions and 5 deletions
|
|
@ -348,7 +348,11 @@ void WorldGenerator::generate(voxel* voxels, int chunkX, int chunkZ) {
|
|||
const auto& structVoxel =
|
||||
structVoxels[vox_index(x, y, z, size.x, size.z)];
|
||||
if (structVoxel.id) {
|
||||
voxels[vox_index(sx, sy, sz)] = structVoxel;
|
||||
if (structVoxel.id == BLOCK_STRUCT_AIR) {
|
||||
voxels[vox_index(sx, sy, sz)] = {0, {}};
|
||||
} else {
|
||||
voxels[vox_index(sx, sy, sz)] = structVoxel;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue