mirror of
https://github.com/overte-org/overte.git
synced 2025-04-08 05:52:38 +02:00
cleanup connect check in DomainServer
This commit is contained in:
parent
fc42c1bc94
commit
e511b6e84c
1 changed files with 11 additions and 5 deletions
|
@ -963,11 +963,17 @@ void DomainServer::sendDomainListToNode(const SharedNodePointer& node, const Hif
|
|||
// overhead of connecting to one another. Additionally we exclude agents that do not care about the
|
||||
// Entity Script Server and won't attempt to connect to it.
|
||||
auto otherNodeData = static_cast<DomainServerNodeData*>(otherNode->getLinkedData());
|
||||
bool shouldNotConnect = (node->getType() == NodeType::Agent && otherNode->getType() == NodeType::EntityScriptServer
|
||||
&& !node->getCanRez() && !node->getCanRezTmp())
|
||||
|| (node->getType() == NodeType::EntityScriptServer && otherNode->getType() == NodeType::Agent
|
||||
&& (!otherNodeData->getNodeInterestSet().contains(NodeType::EntityServer) ||
|
||||
!otherNode->getCanRez() && !otherNode->getCanRezTmp()));
|
||||
|
||||
bool isAgentWithoutRights = node->getType() == NodeType::Agent
|
||||
&& otherNode->getType() == NodeType::EntityScriptServer
|
||||
&& !node->getCanRez() && !node->getCanRezTmp();
|
||||
|
||||
bool isScriptServerForIneffectiveAgent =
|
||||
(node->getType() == NodeType::EntityScriptServer && otherNode->getType() == NodeType::Agent)
|
||||
&& (!otherNodeData->getNodeInterestSet().contains(NodeType::EntityServer)
|
||||
|| (!otherNode->getCanRez() && !otherNode->getCanRezTmp()));
|
||||
|
||||
bool shouldNotConnect = isAgentWithoutRights || isScriptServerForIneffectiveAgent;
|
||||
|
||||
if (!shouldNotConnect) {
|
||||
// since we're about to add a node to the packet we start a segment
|
||||
|
|
Loading…
Reference in a new issue