mirror of
https://github.com/overte-org/overte.git
synced 2025-04-25 21:16:00 +02:00
fixed delete voxel
This commit is contained in:
parent
cf3ff53e2c
commit
03f79f5cab
1 changed files with 3 additions and 3 deletions
|
@ -286,9 +286,9 @@ void VoxelTree::deleteVoxelCodeFromTree(unsigned char* codeBuffer, bool stage, b
|
|||
}
|
||||
}
|
||||
|
||||
// If we're not a colored leaf, and we have no children, then delete ourselves
|
||||
// This will collapse the empty tree above us.
|
||||
if (collapseEmptyTrees && parentNode->getChildCount() == 0 && !parentNode->isColored()) {
|
||||
// If we're in collpaseEmptryTrees mode, and we're the last child of this parent, then delete the parent.
|
||||
// This will collapse the empty tree above us.
|
||||
if (collapseEmptyTrees && parentNode->getChildCount() == 0) {
|
||||
// Can't delete the root this way.
|
||||
if (parentNode != rootNode) {
|
||||
deleteVoxelCodeFromTree(parentNode->getOctalCode(), stage, collapseEmptyTrees);
|
||||
|
|
Loading…
Reference in a new issue