mirror of
https://github.com/lubosz/overte.git
synced 2025-04-08 04:42:20 +02:00
Include the new scale float in min remaining size calculation
This commit is contained in:
parent
536a76a791
commit
08b21109c1
1 changed files with 6 additions and 3 deletions
|
@ -632,9 +632,11 @@ QByteArray AvatarData::toByteArray(AvatarDataDetail dataDetail, quint64 lastSent
|
|||
|
||||
// include jointData if there is room for the most minimal section. i.e. no translations or rotations.
|
||||
IF_AVATAR_SPACE(PACKET_HAS_JOINT_DATA, AvatarDataPacket::minJointDataSize(numJoints)) {
|
||||
// Allow for faux joints + translation bit-vector:
|
||||
const ptrdiff_t minSizeForJoint = sizeof(AvatarDataPacket::SixByteQuat)
|
||||
+ jointBitVectorSize + AvatarDataPacket::FAUX_JOINTS_SIZE;
|
||||
// Minimum space required for another rotation joint -
|
||||
// size of joint + following translation bit-vector + translation scale + faux joints:
|
||||
const ptrdiff_t minSizeForJoint = sizeof(AvatarDataPacket::SixByteQuat) + jointBitVectorSize +
|
||||
sizeof(float) + AvatarDataPacket::FAUX_JOINTS_SIZE;
|
||||
|
||||
auto startSection = destinationBuffer;
|
||||
|
||||
// compute maxTranslationDimension before we send any joint data.
|
||||
|
@ -724,6 +726,7 @@ QByteArray AvatarData::toByteArray(AvatarDataDetail dataDetail, quint64 lastSent
|
|||
const JointData& data = joints[i];
|
||||
const JointData& last = lastSentJointData[i];
|
||||
|
||||
// Note minSizeForJoint is conservative since there isn't a following bit-vector + scale.
|
||||
if (packetEnd - destinationBuffer >= minSizeForJoint) {
|
||||
if (!data.translationIsDefaultPose) {
|
||||
if (sendAll || last.translationIsDefaultPose || (!cullSmallChanges && last.translation != data.translation)
|
||||
|
|
Loading…
Reference in a new issue