Showing the changes to interface/src/VoxelSystem.cpp (1 of 2 files). Show all
Unified · Split
| @@ -212,7 +212,7 @@ int VoxelSystem::newTreeToArrays(VoxelNode* node) { · 211 unmodified lines | ||
| 212 | 212 | } |
| 213 | 213 | node->setShouldRender(shouldRender); |
| 214 | 214 | // let children figure out their renderness |
| 215 | − for (int i = 0; i < 8; i++) { | |
| 215 | + for (int i = 0; i < NUMBER_OF_CHILDREN; i++) { | |
| 216 | 216 | if (node->getChildAtIndex(i)) { |
| 217 | 217 | voxelsUpdated += newTreeToArrays(node->getChildAtIndex(i)); |
| 218 | 218 | } |
| @@ -595,7 +595,7 @@ bool VoxelSystem::removeOutOfViewOperation(VoxelNode* node, void* extraData) { · 376 unmodified lines | ||
| 595 | 595 | VoxelSystem* thisVoxelSystem = (VoxelSystem*) extraData; |
| 596 | 596 | _nodeCount++; |
| 597 | 597 | // Need to operate on our child nodes, so we can remove them |
| 598 | − for (int i = 0; i < 8; i++) { | |
| 598 | + for (int i = 0; i < NUMBER_OF_CHILDREN; i++) { | |
| 599 | 599 | VoxelNode* childNode = node->getChildAtIndex(i); |
| 600 | 600 | if (childNode && !childNode->isInView(*thisVoxelSystem->_viewFrustum)) { |
| 601 | 601 | node->removeChildAtIndex(i); |