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 | 3596 | int statsMessageLength = 0; |
| 3597 | 3597 | |
| 3598 | 3598 | const QUuid& nodeUUID = sendingNode->getUUID(); |
| 3599 | − OctreeSceneStats* octreeStats; | |
| 3600 | − | |
| 3599 | + | |
| 3601 | 3600 | // now that we know the node ID, let's add these stats to the stats for that node... |
| 3602 | 3601 | _octreeSceneStatsLock.lockForWrite(); |
| 3603 | − auto it = _octreeServerSceneStats.find(nodeUUID); | |
| 3604 | − if (it != _octreeServerSceneStats.end()) { | |
| 3605 | − octreeStats = &it->second; | |
| 3606 | − statsMessageLength = octreeStats->unpackFromPacket(packet); | |
| 3607 | − } else { | |
| 3608 | − OctreeSceneStats temp; | |
| 3609 | − statsMessageLength = temp.unpackFromPacket(packet); | |
| 3610 | − octreeStats = &temp; | |
| 3611 | − } | |
| 3602 | + | |
| 3603 | + OctreeSceneStats* octreeStats = &_octreeServerSceneStats[nodeUUID]; | |
| 3604 | + statsMessageLength = octreeStats->unpackFromPacket(packet); | |
| 3605 | + | |
| 3612 | 3606 | _octreeSceneStatsLock.unlock(); |
| 3613 | 3607 | |
| 3614 | 3608 | VoxelPositionSize rootDetails; |