Showing the changes to interface/src/Application.cpp (1 of 1 file). Show all
Unified · Split
| @@ -3596,19 +3596,13 @@ int Application::processOctreeStats(NLPacket& packet, SharedNodePointer sendingN · 3595 unmodified lines | |||
| 3596 | int statsMessageLength = 0; | 3596 | int statsMessageLength = 0; |
| 3597 | 3597 | ||
| 3598 | const QUuid& nodeUUID = sendingNode->getUUID(); | 3598 | const QUuid& nodeUUID = sendingNode->getUUID(); |
| 3599 | OctreeSceneStats* octreeStats; | 3599 | |
| 3600 | |||
| 3601 | // now that we know the node ID, let's add these stats to the stats for that node... | 3600 | // now that we know the node ID, let's add these stats to the stats for that node... |
| 3602 | _octreeSceneStatsLock.lockForWrite(); | 3601 | _octreeSceneStatsLock.lockForWrite(); |
| 3603 | auto it = _octreeServerSceneStats.find(nodeUUID); | 3602 | |
| 3604 | if (it != _octreeServerSceneStats.end()) { | 3603 | OctreeSceneStats* octreeStats = &_octreeServerSceneStats[nodeUUID]; |
| 3605 | octreeStats = &it->second; | 3604 | statsMessageLength = octreeStats->unpackFromPacket(packet); |
| 3606 | statsMessageLength = octreeStats->unpackFromPacket(packet); | 3605 | |
| 3607 | } else { | ||
| 3608 | OctreeSceneStats temp; | ||
| 3609 | statsMessageLength = temp.unpackFromPacket(packet); | ||
| 3610 | octreeStats = &temp; | ||
| 3611 | } | ||
| 3612 | _octreeSceneStatsLock.unlock(); | 3606 | _octreeSceneStatsLock.unlock(); |
| 3613 | 3607 | ||
| 3614 | VoxelPositionSize rootDetails; | 3608 | VoxelPositionSize rootDetails; |