mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-09 05:58:35 +02:00
send back a 10 level voxel tree from server
This commit is contained in:
parent
61f23a2d0f
commit
c40800db8b
2 changed files with 4 additions and 4 deletions
|
@ -220,7 +220,7 @@ unsigned char * VoxelTree::loadBitstreamBuffer(unsigned char *& bitstreamBuffer,
|
||||||
|
|
||||||
// copy the childMask to the current position of the bitstreamBuffer
|
// copy the childMask to the current position of the bitstreamBuffer
|
||||||
// and push the buffer pointer forwards
|
// and push the buffer pointer forwards
|
||||||
*(bitstreamBuffer++) = *currentVoxelNode->octalCode < deepestLevel
|
*(bitstreamBuffer++) = *currentVoxelNode->octalCode < deepestLevel - 1
|
||||||
? currentVoxelNode->childMask
|
? currentVoxelNode->childMask
|
||||||
: 0;
|
: 0;
|
||||||
} else {
|
} else {
|
||||||
|
@ -231,7 +231,7 @@ unsigned char * VoxelTree::loadBitstreamBuffer(unsigned char *& bitstreamBuffer,
|
||||||
|
|
||||||
unsigned char * childStopOctalCode = NULL;
|
unsigned char * childStopOctalCode = NULL;
|
||||||
|
|
||||||
if (*currentVoxelNode->octalCode < deepestLevel) {
|
if (*currentVoxelNode->octalCode < deepestLevel - 1) {
|
||||||
for (int i = firstIndexToCheck; i < 8; i ++) {
|
for (int i = firstIndexToCheck; i < 8; i ++) {
|
||||||
|
|
||||||
// ask the child to load this bitstream buffer
|
// ask the child to load this bitstream buffer
|
||||||
|
|
|
@ -43,7 +43,7 @@ char DOMAIN_HOSTNAME[] = "highfidelity.below92.com";
|
||||||
char DOMAIN_IP[100] = ""; // IP Address will be re-set by lookup on startup
|
char DOMAIN_IP[100] = ""; // IP Address will be re-set by lookup on startup
|
||||||
const int DOMAINSERVER_PORT = 40102;
|
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);
|
AgentList agentList(VOXEL_LISTEN_PORT);
|
||||||
in_addr_t localAddress;
|
in_addr_t localAddress;
|
||||||
|
@ -209,7 +209,7 @@ int main(int argc, const char * argv[])
|
||||||
agentList.updateAgentWithData(&agentPublicAddress, (void *)packetData, receivedBytes);
|
agentList.updateAgentWithData(&agentPublicAddress, (void *)packetData, receivedBytes);
|
||||||
|
|
||||||
VoxelAgentData *agentData = (VoxelAgentData *) agentList.getAgents()[agentList.indexOfMatchingAgent(&agentPublicAddress)].getLinkedData();
|
VoxelAgentData *agentData = (VoxelAgentData *) agentList.getAgents()[agentList.indexOfMatchingAgent(&agentPublicAddress)].getLinkedData();
|
||||||
int newLevel = 6;
|
int newLevel = 10;
|
||||||
if (newLevel > agentData->lastSentLevel) {
|
if (newLevel > agentData->lastSentLevel) {
|
||||||
// the agent has already received a deeper level than this from us
|
// the agent has already received a deeper level than this from us
|
||||||
// do nothing
|
// do nothing
|
||||||
|
|
Loading…
Reference in a new issue