Fix octree max pps
Showing the changes to interface/src/Application.cpp (1 of 2 files). Show all
Unified · Split
| @@ -2647,7 +2647,10 @@ void Application::queryOctree(NodeType_t serverType, PacketType packetType, Node · 2646 unmodified lines | ||
| 2647 | 2647 | if (rootCode) { |
| 2648 | 2648 | VoxelPositionSize rootDetails; |
| 2649 | 2649 | voxelDetailsForCode(rootCode, rootDetails); |
| 2650 | − AACube serverBounds(glm::vec3(rootDetails.x, rootDetails.y, rootDetails.z), rootDetails.s); | |
| 2650 | + AACube serverBounds(glm::vec3(rootDetails.x * TREE_SCALE, | |
| 2651 | + rootDetails.y * TREE_SCALE, | |
| 2652 | + rootDetails.z * TREE_SCALE), | |
| 2653 | + rootDetails.s * TREE_SCALE); | |
| 2651 | 2654 | |
| 2652 | 2655 | ViewFrustum::location serverFrustumLocation = _viewFrustum.cubeInFrustum(serverBounds); |
| 2653 | 2656 | |
| @@ -2688,7 +2691,6 @@ void Application::queryOctree(NodeType_t serverType, PacketType packetType, Node · 34 unmodified lines | ||
| 2688 | 2691 | // only send to the NodeTypes that are serverType |
| 2689 | 2692 | if (node->getActiveSocket() && node->getType() == serverType) { |
| 2690 | 2693 | |
| 2691 | − | |
| 2692 | 2694 | // get the server bounds for this server |
| 2693 | 2695 | QUuid nodeUUID = node->getUUID(); |
| 2694 | 2696 | |
| @@ -2710,7 +2712,12 @@ void Application::queryOctree(NodeType_t serverType, PacketType packetType, Node · 15 unmodified lines | ||
| 2710 | 2712 | if (rootCode) { |
| 2711 | 2713 | VoxelPositionSize rootDetails; |
| 2712 | 2714 | voxelDetailsForCode(rootCode, rootDetails); |
| 2713 | − AACube serverBounds(glm::vec3(rootDetails.x, rootDetails.y, rootDetails.z), rootDetails.s); | |
| 2715 | + AACube serverBounds(glm::vec3(rootDetails.x * TREE_SCALE, | |
| 2716 | + rootDetails.y * TREE_SCALE, | |
| 2717 | + rootDetails.z * TREE_SCALE), | |
| 2718 | + rootDetails.s * TREE_SCALE); | |
| 2719 | + | |
| 2720 | + | |
| 2714 | 2721 | |
| 2715 | 2722 | ViewFrustum::location serverFrustumLocation = _viewFrustum.cubeInFrustum(serverBounds); |
| 2716 | 2723 | if (serverFrustumLocation != ViewFrustum::OUTSIDE) { |
| @@ -2756,7 +2763,7 @@ void Application::queryOctree(NodeType_t serverType, PacketType packetType, Node · 39 unmodified lines | ||
| 2756 | 2763 | } |
| 2757 | 2764 | // set up the packet for sending... |
| 2758 | 2765 | unsigned char* endOfQueryPacket = queryPacket; |
| 2759 | − | |
| 2766 | + | |
| 2760 | 2767 | // insert packet type/version and node UUID |
| 2761 | 2768 | endOfQueryPacket += populatePacketHeader(reinterpret_cast<char*>(endOfQueryPacket), packetType); |
| 2762 | 2769 | |