Showing the changes to interface/src/Application.cpp (1 of 7 files). Show all
Unified · Split
| @@ -3826,15 +3826,16 @@ void Application::nodeKilled(Node* node) { · 3825 unmodified lines | |||
| 3826 | uint16_t nodeID = node->getNodeID(); | 3826 | uint16_t nodeID = node->getNodeID(); |
| 3827 | // see if this is the first we've heard of this node... | 3827 | // see if this is the first we've heard of this node... |
| 3828 | if (_voxelServerJurisdictions.find(nodeID) != _voxelServerJurisdictions.end()) { | 3828 | if (_voxelServerJurisdictions.find(nodeID) != _voxelServerJurisdictions.end()) { |
| 3829 | VoxelPositionSize jurisditionDetails; | 3829 | unsigned char* rootCode = _voxelServerJurisdictions[nodeID].getRootOctalCode(); |
| 3830 | jurisditionDetails = _voxelServerJurisdictions[nodeID]; | 3830 | VoxelPositionSize rootDetails; |
| 3831 | voxelDetailsForCode(rootCode, rootDetails); | ||
| 3831 | 3832 | ||
| 3832 | printf("voxel server going away...... v[%f, %f, %f, %f]\n", | 3833 | printf("voxel server going away...... v[%f, %f, %f, %f]\n", |
| 3833 | jurisditionDetails.x, jurisditionDetails.y, jurisditionDetails.z, jurisditionDetails.s); | 3834 | rootDetails.x, rootDetails.y, rootDetails.z, rootDetails.s); |
| 3834 | 3835 | ||
| 3835 | // Add the jurisditionDetails object to the list of "fade outs" | 3836 | // Add the jurisditionDetails object to the list of "fade outs" |
| 3836 | VoxelFade fade(VoxelFade::FADE_OUT, NODE_KILLED_RED, NODE_KILLED_GREEN, NODE_KILLED_BLUE); | 3837 | VoxelFade fade(VoxelFade::FADE_OUT, NODE_KILLED_RED, NODE_KILLED_GREEN, NODE_KILLED_BLUE); |
| 3837 | fade.voxelDetails = jurisditionDetails; | 3838 | fade.voxelDetails = rootDetails; |
| 3838 | const float slightly_smaller = 0.99; | 3839 | const float slightly_smaller = 0.99; |
| 3839 | fade.voxelDetails.s = fade.voxelDetails.s * slightly_smaller; | 3840 | fade.voxelDetails.s = fade.voxelDetails.s * slightly_smaller; |
| 3840 | _voxelFades.push_back(fade); | 3841 | _voxelFades.push_back(fade); |
| @@ -3855,23 +3856,24 @@ int Application::parseVoxelStats(unsigned char* messageData, ssize_t messageLeng · 14 unmodified lines | |||
| 3855 | if (voxelServer) { | 3856 | if (voxelServer) { |
| 3856 | uint16_t nodeID = voxelServer->getNodeID(); | 3857 | uint16_t nodeID = voxelServer->getNodeID(); |
| 3857 | 3858 | ||
| 3858 | VoxelPositionSize jurisditionDetails; | 3859 | VoxelPositionSize rootDetails; |
| 3859 | voxelDetailsForCode(_voxelSceneStats.getJurisdictionRoot(), jurisditionDetails); | 3860 | voxelDetailsForCode(_voxelSceneStats.getJurisdictionRoot(), rootDetails); |
| 3860 | 3861 | ||
| 3861 | // see if this is the first we've heard of this node... | 3862 | // see if this is the first we've heard of this node... |
| 3862 | if (_voxelServerJurisdictions.find(nodeID) == _voxelServerJurisdictions.end()) { | 3863 | if (_voxelServerJurisdictions.find(nodeID) == _voxelServerJurisdictions.end()) { |
| 3863 | printf("stats from new voxel server... v[%f, %f, %f, %f]\n", | 3864 | printf("stats from new voxel server... v[%f, %f, %f, %f]\n", |
| 3864 | jurisditionDetails.x, jurisditionDetails.y, jurisditionDetails.z, jurisditionDetails.s); | 3865 | rootDetails.x, rootDetails.y, rootDetails.z, rootDetails.s); |
| 3865 | 3866 | ||
| 3866 | // Add the jurisditionDetails object to the list of "fade outs" | 3867 | // Add the jurisditionDetails object to the list of "fade outs" |
| 3867 | VoxelFade fade(VoxelFade::FADE_OUT, NODE_ADDED_RED, NODE_ADDED_GREEN, NODE_ADDED_BLUE); | 3868 | VoxelFade fade(VoxelFade::FADE_OUT, NODE_ADDED_RED, NODE_ADDED_GREEN, NODE_ADDED_BLUE); |
| 3868 | fade.voxelDetails = jurisditionDetails; | 3869 | fade.voxelDetails = rootDetails; |
| 3869 | const float slightly_smaller = 0.99; | 3870 | const float slightly_smaller = 0.99; |
| 3870 | fade.voxelDetails.s = fade.voxelDetails.s * slightly_smaller; | 3871 | fade.voxelDetails.s = fade.voxelDetails.s * slightly_smaller; |
| 3871 | _voxelFades.push_back(fade); | 3872 | _voxelFades.push_back(fade); |
| 3872 | } | 3873 | } |
| 3873 | // store jurisdiction details for later use | 3874 | // store jurisdiction details for later use |
| 3874 | _voxelServerJurisdictions[nodeID] = jurisditionDetails; | 3875 | _voxelServerJurisdictions[nodeID] = JurisdictionMap(_voxelSceneStats.getJurisdictionRoot(), |
| 3876 | _voxelSceneStats.getJurisdictionEndNodes()); | ||
| 3875 | } | 3877 | } |
| 3876 | return statsMessageLength; | 3878 | return statsMessageLength; |
| 3877 | } | 3879 | } |