Showing the changes to interface/src/Application.cpp (1 of 7 files). Show all
Unified · Split
| @@ -2540,7 +2540,7 @@ void Application::update(float deltaTime) { · 2539 unmodified lines | |||
| 2540 | } | 2540 | } |
| 2541 | 2541 | ||
| 2542 | // Leap finger-sensing device | 2542 | // Leap finger-sensing device |
| 2543 | LeapManager::enableFakeFingers(_simulateLeapHand->isChecked() || _testRaveGlove->isChecked()); | 2543 | LeapManager::enableFakeFingers(_simulateLeapHand->isChecked()); |
| 2544 | _myAvatar.getHand().setRaveGloveActive(_testRaveGlove->isChecked()); | 2544 | _myAvatar.getHand().setRaveGloveActive(_testRaveGlove->isChecked()); |
| 2545 | LeapManager::nextFrame(_myAvatar); | 2545 | LeapManager::nextFrame(_myAvatar); |
| 2546 | 2546 | ||
| @@ -2743,7 +2743,7 @@ void Application::updateAvatar(float deltaTime) { · 196 unmodified lines | |||
| 2743 | 2743 | ||
| 2744 | // If I'm in paint mode, send a voxel out to VOXEL server nodes. | 2744 | // If I'm in paint mode, send a voxel out to VOXEL server nodes. |
| 2745 | if (_paintOn) { | 2745 | if (_paintOn) { |
| 2746 | 2746 | ||
| 2747 | glm::vec3 avatarPos = _myAvatar.getPosition(); | 2747 | glm::vec3 avatarPos = _myAvatar.getPosition(); |
| 2748 | 2748 | ||
| 2749 | // For some reason, we don't want to flip X and Z here. | 2749 | // 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 | |||
| 2754 | if (_paintingVoxel.x >= 0.0 && _paintingVoxel.x <= 1.0 && | 2754 | if (_paintingVoxel.x >= 0.0 && _paintingVoxel.x <= 1.0 && |
| 2755 | _paintingVoxel.y >= 0.0 && _paintingVoxel.y <= 1.0 && | 2755 | _paintingVoxel.y >= 0.0 && _paintingVoxel.y <= 1.0 && |
| 2756 | _paintingVoxel.z >= 0.0 && _paintingVoxel.z <= 1.0) { | 2756 | _paintingVoxel.z >= 0.0 && _paintingVoxel.z <= 1.0) { |
| 2757 | 2757 | ||
| 2758 | PACKET_TYPE message = (_destructiveAddVoxel->isChecked() ? | 2758 | PACKET_TYPE message = (_destructiveAddVoxel->isChecked() ? |
| 2759 | PACKET_TYPE_SET_VOXEL_DESTRUCTIVE : PACKET_TYPE_SET_VOXEL); | 2759 | PACKET_TYPE_SET_VOXEL_DESTRUCTIVE : PACKET_TYPE_SET_VOXEL); |
| 2760 | sendVoxelEditMessage(message, _paintingVoxel); | 2760 | sendVoxelEditMessage(message, _paintingVoxel); |
| @@ -3962,24 +3962,27 @@ int Application::parseVoxelStats(unsigned char* messageData, ssize_t messageLeng · 1201 unmodified lines | |||
| 3962 | 3962 | ||
| 3963 | // But, also identify the sender, and keep track of the contained jurisdiction root for this server | 3963 | // But, also identify the sender, and keep track of the contained jurisdiction root for this server |
| 3964 | Node* voxelServer = NodeList::getInstance()->nodeWithAddress(&senderAddress); | 3964 | Node* voxelServer = NodeList::getInstance()->nodeWithAddress(&senderAddress); |
| 3965 | uint16_t nodeID = voxelServer->getNodeID(); | ||
| 3966 | |||
| 3967 | VoxelPositionSize jurisditionDetails; | ||
| 3968 | voxelDetailsForCode(_voxelSceneStats.getJurisdictionRoot(), jurisditionDetails); | ||
| 3969 | 3965 | ||
| 3970 | // see if this is the first we've heard of this node... | 3966 | // quick fix for crash... why would voxelServer be NULL? |
| 3971 | if (_voxelServerJurisdictions.find(nodeID) == _voxelServerJurisdictions.end()) { | 3967 | if (voxelServer) { |
| 3972 | printf("stats from new voxel server... v[%f, %f, %f, %f]\n", | 3968 | uint16_t nodeID = voxelServer->getNodeID(); |
| 3973 | jurisditionDetails.x, jurisditionDetails.y, jurisditionDetails.z, jurisditionDetails.s); | ||
| 3974 | 3969 | ||
| 3975 | // Add the jurisditionDetails object to the list of "fade outs" | 3970 | VoxelPositionSize jurisditionDetails; |
| 3976 | VoxelFade fade(VoxelFade::FADE_OUT, NODE_ADDED_RED, NODE_ADDED_GREEN, NODE_ADDED_BLUE); | 3971 | voxelDetailsForCode(_voxelSceneStats.getJurisdictionRoot(), jurisditionDetails); |
| 3977 | fade.voxelDetails = jurisditionDetails; | 3972 | |
| 3978 | _voxelFades.push_back(fade); | 3973 | // see if this is the first we've heard of this node... |
| 3979 | } | 3974 | if (_voxelServerJurisdictions.find(nodeID) == _voxelServerJurisdictions.end()) { |
| 3980 | // store jurisdiction details for later use | 3975 | printf("stats from new voxel server... v[%f, %f, %f, %f]\n", |
| 3981 | _voxelServerJurisdictions[nodeID] = jurisditionDetails; | 3976 | jurisditionDetails.x, jurisditionDetails.y, jurisditionDetails.z, jurisditionDetails.s); |
| 3982 | 3977 | ||
| 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 | } | ||
| 3983 | return statsMessageLength; | 3986 | return statsMessageLength; |
| 3984 | } | 3987 | } |
| 3985 | 3988 | ||