CR feedback 1

This commit is contained in:
Zach Fox 2017-03-01 09:07:27 -08:00
parent 718ecea404
commit 8bdbbd4b25

View file

@ -134,15 +134,14 @@ void AvatarMixerSlave::broadcastAvatarData(const SharedNodePointer& node) {
// When this is true, the AvatarMixer will send Avatar data to a client about avatars that have ignored them // When this is true, the AvatarMixer will send Avatar data to a client about avatars that have ignored them
bool getsAnyIgnored = PALIsOpen && node->getCanKick(); bool getsAnyIgnored = PALIsOpen && node->getCanKick();
// Increase minimumBytesPerAvatar if the PAL is open or we're gettingAnyIgnored // Increase minimumBytesPerAvatar if the PAL is open
if (PALIsOpen || getsAnyIgnored) { if (PALIsOpen) {
minimumBytesPerAvatar += sizeof(AvatarDataPacket::AvatarGlobalPosition) + minimumBytesPerAvatar += sizeof(AvatarDataPacket::AvatarGlobalPosition) +
sizeof(AvatarDataPacket::AudioLoudness); sizeof(AvatarDataPacket::AudioLoudness);
} }
if (PALIsOpen) { if (PALIsOpen) {
if (_identitySendProbability == DEFAULT_IDENTITY_SEND_PROBABILITY) if (_identitySendProbability == DEFAULT_IDENTITY_SEND_PROBABILITY) {
{
// The client has just opened the PAL. Force all identity packets to be sent to // The client has just opened the PAL. Force all identity packets to be sent to
// this client. // this client.
_identitySendProbability = 1.0f; _identitySendProbability = 1.0f;
@ -327,7 +326,7 @@ void AvatarMixerSlave::broadcastAvatarData(const SharedNodePointer& node) {
|| otherNodeData->getIdentityChangeTimestamp() > _lastFrameTimestamp || otherNodeData->getIdentityChangeTimestamp() > _lastFrameTimestamp
|| distribution(generator) < _identitySendProbability)) || || distribution(generator) < _identitySendProbability)) ||
// Also make sure we send identity packets if the PAL is open. // Also make sure we send identity packets if the PAL is open.
((PALIsOpen || getsAnyIgnored) && distribution(generator) < _identitySendProbability)) { (PALIsOpen && distribution(generator) < _identitySendProbability)) {
identityBytesSent += sendIdentityPacket(otherNodeData, node); identityBytesSent += sendIdentityPacket(otherNodeData, node);
} }
@ -348,9 +347,9 @@ void AvatarMixerSlave::broadcastAvatarData(const SharedNodePointer& node) {
if (overBudget) { if (overBudget) {
overBudgetAvatars++; overBudgetAvatars++;
_stats.overBudgetAvatars++; _stats.overBudgetAvatars++;
detail = (PALIsOpen || getsAnyIgnored) ? AvatarData::PALMinimum : AvatarData::NoData; detail = PALIsOpen ? AvatarData::PALMinimum : AvatarData::NoData;
} else if (!isInView) { } else if (!isInView) {
detail = (PALIsOpen || getsAnyIgnored) ? AvatarData::PALMinimum : AvatarData::NoData; detail = PALIsOpen ? AvatarData::PALMinimum : AvatarData::NoData;
nodeData->incrementAvatarOutOfView(); nodeData->incrementAvatarOutOfView();
} else { } else {
detail = distribution(generator) < AVATAR_SEND_FULL_UPDATE_RATIO detail = distribution(generator) < AVATAR_SEND_FULL_UPDATE_RATIO