mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-29 19:22:57 +02:00
Merge pull request #3767 from birarda/plugs
fix a bug produced by not setting deleted var to NULL
This commit is contained in:
commit
338c5aea94
2 changed files with 5 additions and 4 deletions
|
@ -547,11 +547,12 @@ void Octree::deleteOctalCodeFromTreeRecursion(OctreeElement* element, void* extr
|
||||||
|
|
||||||
void Octree::eraseAllOctreeElements(bool createNewRoot) {
|
void Octree::eraseAllOctreeElements(bool createNewRoot) {
|
||||||
delete _rootElement; // this will recurse and delete all children
|
delete _rootElement; // this will recurse and delete all children
|
||||||
|
_rootElement = NULL;
|
||||||
|
|
||||||
if (createNewRoot) {
|
if (createNewRoot) {
|
||||||
_rootElement = createNewElement();
|
_rootElement = createNewElement();
|
||||||
} else {
|
|
||||||
_rootElement = NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_isDirty = true;
|
_isDirty = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -79,8 +79,8 @@ public:
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
uint32_t _glBufferIndex : 24, /// Client only, vbo index for this voxel if being rendered, 3 bytes
|
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 _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
|
// 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
|
// in use by various voxel nodes. We map the VoxelSystem pointers into an 1 byte key, this limits us to at
|
||||||
|
|
Loading…
Reference in a new issue