mirror of
https://github.com/overte-org/overte.git
synced 2025-07-23 14:44:01 +02:00
Some code review feedback
more to come
This commit is contained in:
parent
7faa689d1d
commit
38a3ee4104
2 changed files with 10 additions and 6 deletions
|
@ -207,9 +207,13 @@ void AvatarMixer::broadcastAvatarData() {
|
||||||
// use the data rate specifically for avatar data for FRD adjustment checks
|
// use the data rate specifically for avatar data for FRD adjustment checks
|
||||||
float avatarDataRateLastSecond = nodeData->getOutboundAvatarDataKbps();
|
float avatarDataRateLastSecond = nodeData->getOutboundAvatarDataKbps();
|
||||||
|
|
||||||
// send extra data that is otherwise surpressed
|
// When this is true, the AvatarMixer will send Avatar data to a client about avatars that are not in the view frustrum
|
||||||
bool getsOutOfView = nodeData->getRequestsDomainListData();
|
bool getsOutOfView = nodeData->getRequestsDomainListData();
|
||||||
bool getsIgnoredByMe = nodeData->getRequestsDomainListData();
|
|
||||||
|
// When this is true, the AvatarMixer will send Avatar data to a client about avatars that they've ignored
|
||||||
|
bool getsIgnoredByMe = getsOutOfView;
|
||||||
|
|
||||||
|
// When this is true, the AvatarMixer will send Avatar data to a client about avatars that have ignored them
|
||||||
bool getsAnyIgnored = getsIgnoredByMe && node->getCanKick();
|
bool getsAnyIgnored = getsIgnoredByMe && node->getCanKick();
|
||||||
|
|
||||||
// Check if it is time to adjust what we send this client based on the observed
|
// Check if it is time to adjust what we send this client based on the observed
|
||||||
|
|
|
@ -812,7 +812,7 @@ void NodeList::ignoreNodeBySessionID(const QUuid& nodeID) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void NodeList::unignoreNodeBySessionID(const QUuid& nodeID) {
|
void NodeList::unignoreNodeBySessionID(const QUuid& nodeID) {
|
||||||
// enumerate the nodes to send a reliable ignore packet to each that can leverage it
|
// enumerate the nodes to send a reliable unignore packet to each that can leverage it
|
||||||
if (!nodeID.isNull() && _sessionUUID != nodeID) {
|
if (!nodeID.isNull() && _sessionUUID != nodeID) {
|
||||||
eachMatchingNode([&nodeID](const SharedNodePointer& node)->bool {
|
eachMatchingNode([&nodeID](const SharedNodePointer& node)->bool {
|
||||||
if (node->getType() == NodeType::AudioMixer || node->getType() == NodeType::AvatarMixer) {
|
if (node->getType() == NodeType::AudioMixer || node->getType() == NodeType::AvatarMixer) {
|
||||||
|
@ -821,7 +821,7 @@ void NodeList::unignoreNodeBySessionID(const QUuid& nodeID) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}, [&nodeID, this](const SharedNodePointer& destinationNode) {
|
}, [&nodeID, this](const SharedNodePointer& destinationNode) {
|
||||||
// create a reliable NLPacket with space for the ignore UUID
|
// create a reliable NLPacket with space for the unignore UUID
|
||||||
auto ignorePacket = NLPacket::create(PacketType::NodeUnignoreRequest, NUM_BYTES_RFC4122_UUID, true);
|
auto ignorePacket = NLPacket::create(PacketType::NodeUnignoreRequest, NUM_BYTES_RFC4122_UUID, true);
|
||||||
|
|
||||||
// write the node ID to the packet
|
// write the node ID to the packet
|
||||||
|
@ -829,7 +829,7 @@ void NodeList::unignoreNodeBySessionID(const QUuid& nodeID) {
|
||||||
|
|
||||||
qCDebug(networking) << "Sending packet to unignore node" << uuidStringWithoutCurlyBraces(nodeID);
|
qCDebug(networking) << "Sending packet to unignore node" << uuidStringWithoutCurlyBraces(nodeID);
|
||||||
|
|
||||||
// send off this ignore packet reliably to the matching node
|
// send off this unignore packet reliably to the matching node
|
||||||
sendPacket(std::move(ignorePacket), *destinationNode);
|
sendPacket(std::move(ignorePacket), *destinationNode);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue