This commit is contained in:
Brad Hefta-Gaub 2016-12-14 20:24:52 -08:00
parent c8fb467579
commit 439434b300
2 changed files with 4 additions and 5 deletions
assignment-client/src/avatars
libraries/avatars/src

View file

@ -363,7 +363,7 @@ void AvatarMixer::broadcastAvatarData() {
numAvatarDataBytes += avatarPacketList->write(otherNode->getUUID().toRfc4122());
numAvatarDataBytes +=
avatarPacketList->write(otherAvatar.toByteArray(false, distribution(generator) < AVATAR_SEND_FULL_UPDATE_RATIO), sendMinimumForOutOfView);
avatarPacketList->write(otherAvatar.toByteArray(false, distribution(generator) < AVATAR_SEND_FULL_UPDATE_RATIO, sendMinimumForOutOfView));
avatarPacketList->endSegment();
});

View file

@ -217,8 +217,7 @@ QByteArray AvatarData::toByteArray(bool cullSmallChanges, bool sendAll, bool sen
memcpy(destinationBuffer, &_globalPosition, sizeof(_globalPosition));
destinationBuffer += sizeof(_globalPosition);
qDebug() << __FUNCTION__ << "minimum... included global position!!";
}
else {
} else {
//qDebug() << __FUNCTION__ << "not minimum... sending actual content!!";
auto header = reinterpret_cast<AvatarDataPacket::Header*>(destinationBuffer);
@ -541,10 +540,10 @@ int AvatarData::parseDataFromBuffer(const QByteArray& buffer) {
memcpy(&_globalPosition, sourceBuffer, sizeof(_globalPosition));
sourceBuffer += sizeof(_globalPosition);
int numBytesRead = (sourceBuffer - startPosition) + sizeof(packetStateFlags);
int numBytesRead = (sourceBuffer - startPosition);
_averageBytesReceived.updateAverage(numBytesRead);
qDebug() << __FUNCTION__ << "minimum... included global position!! numBytesRead:" << numBytesRead;
//qDebug() << __FUNCTION__ << "minimum... included global position!! numBytesRead:" << numBytesRead;
return numBytesRead;
}