diff --git a/shared/src/VoxelTree.cpp b/shared/src/VoxelTree.cpp index 4119bd52a0..643a7a6f8b 100644 --- a/shared/src/VoxelTree.cpp +++ b/shared/src/VoxelTree.cpp @@ -220,7 +220,7 @@ unsigned char * VoxelTree::loadBitstreamBuffer(unsigned char *& bitstreamBuffer, // copy the childMask to the current position of the bitstreamBuffer // and push the buffer pointer forwards - *(bitstreamBuffer++) = *currentVoxelNode->octalCode < deepestLevel + *(bitstreamBuffer++) = *currentVoxelNode->octalCode < deepestLevel - 1 ? currentVoxelNode->childMask : 0; } else { @@ -231,7 +231,7 @@ unsigned char * VoxelTree::loadBitstreamBuffer(unsigned char *& bitstreamBuffer, unsigned char * childStopOctalCode = NULL; - if (*currentVoxelNode->octalCode < deepestLevel) { + if (*currentVoxelNode->octalCode < deepestLevel - 1) { for (int i = firstIndexToCheck; i < 8; i ++) { // ask the child to load this bitstream buffer diff --git a/voxel/src/main.cpp b/voxel/src/main.cpp index 07ce2a2494..6fd757eb63 100644 --- a/voxel/src/main.cpp +++ b/voxel/src/main.cpp @@ -43,7 +43,7 @@ char DOMAIN_HOSTNAME[] = "highfidelity.below92.com"; char DOMAIN_IP[100] = ""; // IP Address will be re-set by lookup on startup const int DOMAINSERVER_PORT = 40102; -const int MAX_VOXEL_TREE_DEPTH_LEVELS = 6; +const int MAX_VOXEL_TREE_DEPTH_LEVELS = 10; AgentList agentList(VOXEL_LISTEN_PORT); in_addr_t localAddress; @@ -209,7 +209,7 @@ int main(int argc, const char * argv[]) agentList.updateAgentWithData(&agentPublicAddress, (void *)packetData, receivedBytes); VoxelAgentData *agentData = (VoxelAgentData *) agentList.getAgents()[agentList.indexOfMatchingAgent(&agentPublicAddress)].getLinkedData(); - int newLevel = 6; + int newLevel = 10; if (newLevel > agentData->lastSentLevel) { // the agent has already received a deeper level than this from us // do nothing