mirror of
https://github.com/overte-org/overte.git
synced 2025-04-12 22:59:02 +02:00
send upstream nodes down to avatar/audio
This commit is contained in:
parent
48b5989b60
commit
ea45e341ee
5 changed files with 14 additions and 7 deletions
|
@ -389,7 +389,10 @@ void AudioMixer::start() {
|
|||
auto nodeList = DependencyManager::get<NodeList>();
|
||||
|
||||
// prepare the NodeList
|
||||
nodeList->addSetOfNodeTypesToNodeInterestSet({ NodeType::Agent, NodeType::DownstreamAudioMixer, NodeType::EntityScriptServer });
|
||||
nodeList->addSetOfNodeTypesToNodeInterestSet({
|
||||
NodeType::Agent, NodeType::EntityScriptServer,
|
||||
NodeType::UpstreamAudioMixer, NodeType::UpstreamAvatarMixer
|
||||
});
|
||||
nodeList->linkedDataCreateCallback = [&](Node* node) { getOrCreateClientData(node); };
|
||||
|
||||
// parse out any AudioMixer settings
|
||||
|
|
|
@ -862,7 +862,10 @@ AvatarMixerClientData* AvatarMixer::getOrCreateClientData(SharedNodePointer node
|
|||
|
||||
void AvatarMixer::domainSettingsRequestComplete() {
|
||||
auto nodeList = DependencyManager::get<NodeList>();
|
||||
nodeList->addSetOfNodeTypesToNodeInterestSet({ NodeType::Agent, NodeType::DownstreamAvatarMixer, NodeType::EntityScriptServer });
|
||||
nodeList->addSetOfNodeTypesToNodeInterestSet({
|
||||
NodeType::Agent, NodeType::EntityScriptServer,
|
||||
NodeType::UpstreamAvatarMixer, NodeType::DownstreamAvatarMixer
|
||||
});
|
||||
|
||||
// parse the settings to pull out the values we need
|
||||
parseDomainServerSettings(nodeList->getDomainHandler().getSettingsObject());
|
||||
|
|
|
@ -2302,7 +2302,8 @@ void DomainServer::updateReplicationNodes(ReplicationServerDirection direction)
|
|||
if (!knownNode) {
|
||||
// manually add the replication node to our node list
|
||||
auto node = nodeList->addOrUpdateNode(QUuid::createUuid(), replicationServer.nodeType,
|
||||
replicationServer.sockAddr, replicationServer.sockAddr);
|
||||
replicationServer.sockAddr, replicationServer.sockAddr,
|
||||
false, direction == Upstream);
|
||||
node->setIsForcedNeverSilent(true);
|
||||
|
||||
qDebug() << "Adding" << (direction == Upstream ? "upstream" : "downstream")
|
||||
|
|
|
@ -583,14 +583,14 @@ SharedNodePointer LimitedNodeList::addOrUpdateNode(const QUuid& uuid, NodeType_t
|
|||
matchingNode->setPermissions(permissions);
|
||||
matchingNode->setConnectionSecret(connectionSecret);
|
||||
matchingNode->setIsReplicated(isReplicated);
|
||||
matchingNode->setIsUpstream(isUpstream);
|
||||
matchingNode->setIsUpstream(isUpstream || NodeType::isUpstream(nodeType));
|
||||
|
||||
return matchingNode;
|
||||
} else {
|
||||
// we didn't have this node, so add them
|
||||
Node* newNode = new Node(uuid, nodeType, publicSocket, localSocket);
|
||||
newNode->setIsReplicated(isReplicated);
|
||||
newNode->setIsUpstream(isUpstream);
|
||||
newNode->setIsUpstream(isUpstream || NodeType::isUpstream(nodeType));
|
||||
newNode->setConnectionSecret(connectionSecret);
|
||||
newNode->setPermissions(permissions);
|
||||
|
||||
|
|
|
@ -669,8 +669,8 @@ void NodeList::parseNodeFromPacketStream(QDataStream& packetStream) {
|
|||
SharedNodePointer node = addOrUpdateNode(nodeUUID, nodeType, nodePublicSocket,
|
||||
nodeLocalSocket, isReplicated, false, connectionUUID, permissions);
|
||||
|
||||
// nodes that are downstream of our own type are kept alive when we hear about them from the domain server
|
||||
if (node->getType() == NodeType::downstreamType(_ownerType)) {
|
||||
// nodes that are downstream or upstream of our own type are kept alive when we hear about them from the domain server
|
||||
if (node->getType() == NodeType::downstreamType(_ownerType) || node->getType() == NodeType::upstreamType(_ownerType)) {
|
||||
node->setLastHeardMicrostamp(usecTimestampNow());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue