mirror of
https://github.com/overte-org/overte.git
synced 2025-04-15 11:08:06 +02:00
wait for node active socket before constructing packets
This commit is contained in:
parent
05a38a78c5
commit
557ee458ec
1 changed files with 6 additions and 3 deletions
|
@ -82,9 +82,12 @@ bool OctreeSendThread::process() {
|
|||
if (auto node = _node.lock()) {
|
||||
OctreeQueryNode* nodeData = static_cast<OctreeQueryNode*>(node->getLinkedData());
|
||||
|
||||
// If we don't have the OctreeQueryNode or it's uninitialized because we haven't received
|
||||
// a query yet from the client then we can't send an entity data packet
|
||||
if (nodeData && nodeData->hasReceivedFirstQuery() && !nodeData->isShuttingDown()) {
|
||||
// If we don't have the OctreeQueryNode at all
|
||||
// or it's uninitialized because we haven't received a query yet from the client
|
||||
// or we don't know where we should send packets for this node
|
||||
// or we're shutting down
|
||||
// then we can't send an entity data packet
|
||||
if (nodeData && nodeData->hasReceivedFirstQuery() && node->getActiveSocket() && !nodeData->isShuttingDown()) {
|
||||
bool viewFrustumChanged = nodeData->updateCurrentViewFrustum();
|
||||
packetDistributor(node, nodeData, viewFrustumChanged);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue