Showing the changes to interface/src/VoxelSystem.cpp (1 of 1 file). Show all
Unified · Split
| @@ -991,7 +991,7 @@ int VoxelSystem::forceRemoveNodeFromArrays(VoxelNode* node) { · 990 unmodified lines | ||
| 991 | 991 | |
| 992 | 992 | int VoxelSystem::updateNodeInArrays(VoxelNode* node, bool reuseIndex, bool forceDraw) { |
| 993 | 993 | // If we've run out of room, then just bail... |
| 994 | − if (_voxelsInWriteArrays >= _maxVoxels) { | |
| 994 | + if (_voxelsInWriteArrays >= _maxVoxels && (_freeIndexes.size() == 0)) { | |
| 995 | 995 | // We need to think about what else we can do in this case. This basically means that all of our available |
| 996 | 996 | // VBO slots are used up, but we're trying to render more voxels. At this point, if this happens we'll just |
| 997 | 997 | // not render these Voxels. We need to think about ways to keep the entire scene intact but maybe lower quality |