Merge branch 'master' of https://github.com/worklist/hifi into add_fs_data_in_head_data

This commit is contained in:
atlante45 2013-09-13 10:44:21 -07:00
commit 74e929100a
3 changed files with 10 additions and 8 deletions

View file

@ -59,6 +59,7 @@ void childClient() {
if (usecTimestampNow() - usecTimestamp(&lastRequest) >= ASSIGNMENT_REQUEST_INTERVAL_USECS) { if (usecTimestampNow() - usecTimestamp(&lastRequest) >= ASSIGNMENT_REQUEST_INTERVAL_USECS) {
gettimeofday(&lastRequest, NULL); gettimeofday(&lastRequest, NULL);
// if we're here we have no assignment, so send a request // if we're here we have no assignment, so send a request
qDebug() << "Sending an assignment request -" << requestAssignment << "\n";
nodeList->sendAssignment(requestAssignment); nodeList->sendAssignment(requestAssignment);
} }

View file

@ -393,7 +393,7 @@ void NodeList::sendAssignment(Assignment& assignment) {
? (sockaddr*) &GLOBAL_ASSIGNMENT_SOCKET ? (sockaddr*) &GLOBAL_ASSIGNMENT_SOCKET
: _assignmentServerSocket; : _assignmentServerSocket;
_nodeSocket.send((sockaddr*) assignmentServerSocket, assignmentPacket, numHeaderBytes + numAssignmentBytes); _nodeSocket.send(assignmentServerSocket, assignmentPacket, numHeaderBytes + numAssignmentBytes);
} }
Node* NodeList::addOrUpdateNode(sockaddr* publicSocket, sockaddr* localSocket, char nodeType, uint16_t nodeId) { Node* NodeList::addOrUpdateNode(sockaddr* publicSocket, sockaddr* localSocket, char nodeType, uint16_t nodeId) {

View file

@ -1772,6 +1772,14 @@ void VoxelTree::copySubTreeIntoNewTree(VoxelNode* startNode, VoxelTree* destinat
ReadBitstreamToTreeParams args(WANT_COLOR, NO_EXISTS_BITS); ReadBitstreamToTreeParams args(WANT_COLOR, NO_EXISTS_BITS);
destinationTree->readBitstreamToTree(&outputBuffer[0], bytesWritten, args); destinationTree->readBitstreamToTree(&outputBuffer[0], bytesWritten, args);
} }
VoxelNode* destinationStartNode;
if (rebaseToRoot) {
destinationStartNode = destinationTree->rootNode;
} else {
destinationStartNode = nodeForOctalCode(destinationTree->rootNode, startNode->getOctalCode(), NULL);
}
destinationStartNode->setColor(startNode->getColor());
} }
void VoxelTree::copyFromTreeIntoSubTree(VoxelTree* sourceTree, VoxelNode* destinationNode) { void VoxelTree::copyFromTreeIntoSubTree(VoxelTree* sourceTree, VoxelNode* destinationNode) {
@ -2041,13 +2049,6 @@ void VoxelTree::nudgeSubTree(VoxelNode* nodeToNudge, const glm::vec3& nudgeAmoun
return; return;
} }
// get octal code of this node
unsigned char* octalCode = nodeToNudge->getOctalCode();
// get voxel position/size
VoxelPositionSize ancestorDetails;
voxelDetailsForCode(octalCode, ancestorDetails);
NodeChunkArgs args; NodeChunkArgs args;
args.thisVoxelTree = this; args.thisVoxelTree = this;
args.nudgeVec = nudgeAmount; args.nudgeVec = nudgeAmount;