History

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

Andrzej Kapolka committed 13 years ago

Commit 377adb32 parents ca939fb 96e6c2f7 files · +94 −115Browse files

Showing the changes to interface/src/Application.cpp (1 of 7 files). Show all

Unified · Split

interface/src/Application.cpp+21−18
@@ -2540,7 +2540,7 @@ void Application::update(float deltaTime) { · 2539 unmodified lines
25402540 }
25412541
25422542 // Leap finger-sensing device
2543− LeapManager::enableFakeFingers(_simulateLeapHand->isChecked() || _testRaveGlove->isChecked());
2543+ LeapManager::enableFakeFingers(_simulateLeapHand->isChecked());
25442544 _myAvatar.getHand().setRaveGloveActive(_testRaveGlove->isChecked());
25452545 LeapManager::nextFrame(_myAvatar);
25462546
@@ -2743,7 +2743,7 @@ void Application::updateAvatar(float deltaTime) { · 196 unmodified lines
27432743
27442744 // If I'm in paint mode, send a voxel out to VOXEL server nodes.
27452745 if (_paintOn) {
2746−
2746+
27472747 glm::vec3 avatarPos = _myAvatar.getPosition();
27482748
27492749 // For some reason, we don't want to flip X and Z here.
@@ -2754,7 +2754,7 @@ void Application::updateAvatar(float deltaTime) { · 4 unmodified lines
27542754 if (_paintingVoxel.x >= 0.0 && _paintingVoxel.x <= 1.0 &&
27552755 _paintingVoxel.y >= 0.0 && _paintingVoxel.y <= 1.0 &&
27562756 _paintingVoxel.z >= 0.0 && _paintingVoxel.z <= 1.0) {
2757−
2757+
27582758 PACKET_TYPE message = (_destructiveAddVoxel->isChecked() ?
27592759 PACKET_TYPE_SET_VOXEL_DESTRUCTIVE : PACKET_TYPE_SET_VOXEL);
27602760 sendVoxelEditMessage(message, _paintingVoxel);
@@ -3962,24 +3962,27 @@ int Application::parseVoxelStats(unsigned char* messageData, ssize_t messageLeng · 1201 unmodified lines
39623962
39633963 // But, also identify the sender, and keep track of the contained jurisdiction root for this server
39643964 Node* voxelServer = NodeList::getInstance()->nodeWithAddress(&senderAddress);
3965− uint16_t nodeID = voxelServer->getNodeID();
3966−
3967− VoxelPositionSize jurisditionDetails;
3968− voxelDetailsForCode(_voxelSceneStats.getJurisdictionRoot(), jurisditionDetails);
39693965
3970− // see if this is the first we've heard of this node...
3971− if (_voxelServerJurisdictions.find(nodeID) == _voxelServerJurisdictions.end()) {
3972− printf("stats from new voxel server... v[%f, %f, %f, %f]\n",
3973− jurisditionDetails.x, jurisditionDetails.y, jurisditionDetails.z, jurisditionDetails.s);
3966+ // quick fix for crash... why would voxelServer be NULL?
3967+ if (voxelServer) {
3968+ uint16_t nodeID = voxelServer->getNodeID();
39743969
3975− // Add the jurisditionDetails object to the list of "fade outs"
3976− VoxelFade fade(VoxelFade::FADE_OUT, NODE_ADDED_RED, NODE_ADDED_GREEN, NODE_ADDED_BLUE);
3977− fade.voxelDetails = jurisditionDetails;
3978− _voxelFades.push_back(fade);
3979− }
3980− // store jurisdiction details for later use
3981− _voxelServerJurisdictions[nodeID] = jurisditionDetails;
3970+ VoxelPositionSize jurisditionDetails;
3971+ voxelDetailsForCode(_voxelSceneStats.getJurisdictionRoot(), jurisditionDetails);
3972+
3973+ // see if this is the first we've heard of this node...
3974+ if (_voxelServerJurisdictions.find(nodeID) == _voxelServerJurisdictions.end()) {
3975+ printf("stats from new voxel server... v[%f, %f, %f, %f]\n",
3976+ jurisditionDetails.x, jurisditionDetails.y, jurisditionDetails.z, jurisditionDetails.s);
39823977
3978+ // Add the jurisditionDetails object to the list of "fade outs"
3979+ VoxelFade fade(VoxelFade::FADE_OUT, NODE_ADDED_RED, NODE_ADDED_GREEN, NODE_ADDED_BLUE);
3980+ fade.voxelDetails = jurisditionDetails;
3981+ _voxelFades.push_back(fade);
3982+ }
3983+ // store jurisdiction details for later use
3984+ _voxelServerJurisdictions[nodeID] = jurisditionDetails;
3985+ }
39833986 return statsMessageLength;
39843987 }
39853988

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t