mirror of
https://github.com/overte-org/overte.git
synced 2025-07-16 20:37:29 +02:00
Merge pull request #6037 from sethalves/dont-send-righthandthumb3
fix bug in AvatarData::toByteArray related code
This commit is contained in:
commit
26b83d0f36
1 changed files with 11 additions and 3 deletions
|
@ -287,6 +287,7 @@ QByteArray AvatarData::toByteArray(bool cullSmallChanges, bool sendAll) {
|
||||||
|
|
||||||
#ifdef WANT_DEBUG
|
#ifdef WANT_DEBUG
|
||||||
int rotationSentCount = 0;
|
int rotationSentCount = 0;
|
||||||
|
unsigned char* beforeRotations = destinationBuffer;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
_lastSentJointData.resize(_jointData.size());
|
_lastSentJointData.resize(_jointData.size());
|
||||||
|
@ -335,6 +336,7 @@ QByteArray AvatarData::toByteArray(bool cullSmallChanges, bool sendAll) {
|
||||||
|
|
||||||
#ifdef WANT_DEBUG
|
#ifdef WANT_DEBUG
|
||||||
int translationSentCount = 0;
|
int translationSentCount = 0;
|
||||||
|
unsigned char* beforeTranslations = destinationBuffer;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
float maxTranslationDimension = 0.0;
|
float maxTranslationDimension = 0.0;
|
||||||
|
@ -387,10 +389,15 @@ QByteArray AvatarData::toByteArray(bool cullSmallChanges, bool sendAll) {
|
||||||
|
|
||||||
#ifdef WANT_DEBUG
|
#ifdef WANT_DEBUG
|
||||||
if (sendAll) {
|
if (sendAll) {
|
||||||
qDebug() << "SENDING -- rotations:" << rotationSentCount << "translations:" << translationSentCount
|
qDebug() << "AvatarData::toByteArray" << cullSmallChanges << sendAll
|
||||||
|
<< "rotations:" << rotationSentCount << "translations:" << translationSentCount
|
||||||
<< "largest:" << maxTranslationDimension
|
<< "largest:" << maxTranslationDimension
|
||||||
<< "radix:" << translationCompressionRadix
|
<< "radix:" << translationCompressionRadix
|
||||||
<< "size:" << (int)(destinationBuffer - startPosition);
|
<< "size:"
|
||||||
|
<< (beforeRotations - startPosition) << "+"
|
||||||
|
<< (beforeTranslations - beforeRotations) << "+"
|
||||||
|
<< (destinationBuffer - beforeTranslations) << "="
|
||||||
|
<< (destinationBuffer - startPosition);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -409,7 +416,8 @@ void AvatarData::doneEncoding(bool cullSmallChanges) {
|
||||||
_lastSentJointData[i].rotation = data.rotation;
|
_lastSentJointData[i].rotation = data.rotation;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
if (_lastSentJointData[i].translation != data.translation) {
|
||||||
if (!cullSmallChanges ||
|
if (!cullSmallChanges ||
|
||||||
glm::distance(data.translation, _lastSentJointData[i].translation) > AVATAR_MIN_TRANSLATION) {
|
glm::distance(data.translation, _lastSentJointData[i].translation) > AVATAR_MIN_TRANSLATION) {
|
||||||
if (data.translationSet) {
|
if (data.translationSet) {
|
||||||
|
|
Loading…
Reference in a new issue