diff --git a/libraries/octree/src/Octree.cpp b/libraries/octree/src/Octree.cpp index ceda91a441..596dd7536c 100644 --- a/libraries/octree/src/Octree.cpp +++ b/libraries/octree/src/Octree.cpp @@ -547,11 +547,12 @@ void Octree::deleteOctalCodeFromTreeRecursion(OctreeElement* element, void* extr void Octree::eraseAllOctreeElements(bool createNewRoot) { delete _rootElement; // this will recurse and delete all children + _rootElement = NULL; + if (createNewRoot) { _rootElement = createNewElement(); - } else { - _rootElement = NULL; } + _isDirty = true; } diff --git a/libraries/voxels/src/VoxelTreeElement.h b/libraries/voxels/src/VoxelTreeElement.h index b1bff7dcc9..0ea91d4657 100644 --- a/libraries/voxels/src/VoxelTreeElement.h +++ b/libraries/voxels/src/VoxelTreeElement.h @@ -79,8 +79,8 @@ public: protected: - uint32_t _glBufferIndex : 24, /// Client only, vbo index for this voxel if being rendered, 3 bytes - _voxelSystemIndex : 8; /// Client only, index to the VoxelSystem rendering this voxel, 1 bytes + uint32_t _glBufferIndex : 24; /// Client only, vbo index for this voxel if being rendered, 3 bytes + uint32_t _voxelSystemIndex : 8; /// Client only, index to the VoxelSystem rendering this voxel, 1 bytes // Support for _voxelSystemIndex, we use these static member variables to track the VoxelSystems that are // in use by various voxel nodes. We map the VoxelSystem pointers into an 1 byte key, this limits us to at