mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 19:52:26 +02:00
fix queryPacket initialization in Application
This commit is contained in:
parent
03b17cc5dc
commit
11d5aa9803
1 changed files with 2 additions and 2 deletions
|
@ -2804,7 +2804,7 @@ void Application::queryOctree(NodeType_t serverType, PacketType::Value packetTyp
|
||||||
qCDebug(interfaceapp, "perServerPPS: %d perUnknownServer: %d", perServerPPS, perUnknownServer);
|
qCDebug(interfaceapp, "perServerPPS: %d perUnknownServer: %d", perServerPPS, perUnknownServer);
|
||||||
}
|
}
|
||||||
|
|
||||||
auto queryPacket { NLPacket::create(packetType); }
|
auto queryPacket = NLPacket::create(packetType);
|
||||||
|
|
||||||
nodeList->eachNode([&](const SharedNodePointer& node){
|
nodeList->eachNode([&](const SharedNodePointer& node){
|
||||||
// only send to the NodeTypes that are serverType
|
// only send to the NodeTypes that are serverType
|
||||||
|
@ -2883,7 +2883,7 @@ void Application::queryOctree(NodeType_t serverType, PacketType::Value packetTyp
|
||||||
|
|
||||||
// encode the query data
|
// encode the query data
|
||||||
int packetSize = _octreeQuery.getBroadcastData(queryPacket.payload());
|
int packetSize = _octreeQuery.getBroadcastData(queryPacket.payload());
|
||||||
queryPacket.setSizeUsed(packetSize);
|
queryPacket->setSizeUsed(packetSize);
|
||||||
|
|
||||||
// make sure we still have an active socket
|
// make sure we still have an active socket
|
||||||
nodeList->sendUnreliablePacket(queryPacket, node);
|
nodeList->sendUnreliablePacket(queryPacket, node);
|
||||||
|
|
Loading…
Reference in a new issue