Showing the changes to interface/src/VoxelSystem.cpp (1 of 4 files). Show all
Unified · Split
| @@ -2645,23 +2645,8 @@ bool VoxelSystem::killSourceVoxelsOperation(VoxelNode* node, void* extraData) { · 2644 unmodified lines | |||
| 2645 | void VoxelSystem::nodeKilled(Node* node) { | 2645 | void VoxelSystem::nodeKilled(Node* node) { |
| 2646 | if (node->getType() == NODE_TYPE_VOXEL_SERVER) { | 2646 | if (node->getType() == NODE_TYPE_VOXEL_SERVER) { |
| 2647 | _voxelServerCount--; | 2647 | _voxelServerCount--; |
| 2648 | |||
| 2649 | QUuid nodeUUID = node->getUUID(); | 2648 | QUuid nodeUUID = node->getUUID(); |
| 2650 | |||
| 2651 | qDebug("VoxelSystem... voxel server %s removed...\n", nodeUUID.toString().toLocal8Bit().constData()); | 2649 | qDebug("VoxelSystem... voxel server %s removed...\n", nodeUUID.toString().toLocal8Bit().constData()); |
| 2652 | |||
| 2653 | if (_voxelServerCount > 0) { | ||
| 2654 | // Kill any voxels from the local tree that match this nodeID | ||
| 2655 | // commenting out for removal of 16 bit node IDs | ||
| 2656 | lockTree(); | ||
| 2657 | _tree->recurseTreeWithOperation(killSourceVoxelsOperation, &nodeUUID); | ||
| 2658 | unlockTree(); | ||
| 2659 | _tree->setDirtyBit(); | ||
| 2660 | setupNewVoxelsForDrawing(); | ||
| 2661 | } else { | ||
| 2662 | // Last server, take the easy way and kill all the local voxels! | ||
| 2663 | killLocalVoxels(); | ||
| 2664 | } | ||
| 2665 | } | 2650 | } |
| 2666 | } | 2651 | } |
| 2667 | 2652 | ||