Some code review feedback

more to come
This commit is contained in:
David Kelly 2016-12-23 14:14:45 -08:00 committed by Zach Fox
parent 7faa689d1d
commit 38a3ee4104
2 changed files with 10 additions and 6 deletions

View file

@ -207,9 +207,13 @@ void AvatarMixer::broadcastAvatarData() {
// use the data rate specifically for avatar data for FRD adjustment checks
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 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();
// Check if it is time to adjust what we send this client based on the observed

View file

@ -812,7 +812,7 @@ void NodeList::ignoreNodeBySessionID(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) {
eachMatchingNode([&nodeID](const SharedNodePointer& node)->bool {
if (node->getType() == NodeType::AudioMixer || node->getType() == NodeType::AvatarMixer) {
@ -821,7 +821,7 @@ void NodeList::unignoreNodeBySessionID(const QUuid& nodeID) {
return false;
}
}, [&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);
// 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);
// 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);
});
@ -977,4 +977,4 @@ void NodeList::setRequestsDomainListData(bool isRequesting) {
qDebug() << "HRS FIXME sending RequestsDomainListData packet" << isRequesting;
});
_requestsDomainListData = isRequesting;
}
}