mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 07:58:59 +02:00
Fix for identity packet pong
This commit is contained in:
parent
135fa8c2aa
commit
e792e8eecf
1 changed files with 3 additions and 5 deletions
|
@ -606,7 +606,6 @@ int AvatarData::parseDataFromBuffer(const QByteArray& buffer) {
|
||||||
// joint rotations
|
// joint rotations
|
||||||
int numJoints = *sourceBuffer++;
|
int numJoints = *sourceBuffer++;
|
||||||
|
|
||||||
|
|
||||||
// do not process any jointData until we've received a valid jointIndices hash from
|
// do not process any jointData until we've received a valid jointIndices hash from
|
||||||
// an earlier AvatarIdentity packet. Because if we do, we risk applying the joint data
|
// an earlier AvatarIdentity packet. Because if we do, we risk applying the joint data
|
||||||
// the wrong bones, resulting in a twisted avatar, An un-animated avatar is preferable to this.
|
// the wrong bones, resulting in a twisted avatar, An un-animated avatar is preferable to this.
|
||||||
|
@ -1034,22 +1033,21 @@ QByteArray AvatarData::identityByteArray() {
|
||||||
const QUrl& urlToSend = _skeletonModelURL.scheme() == "file" ? emptyURL : _skeletonModelURL;
|
const QUrl& urlToSend = _skeletonModelURL.scheme() == "file" ? emptyURL : _skeletonModelURL;
|
||||||
|
|
||||||
#ifdef TRANSMIT_JOINT_INDICES_IN_IDENTITY_PACKET
|
#ifdef TRANSMIT_JOINT_INDICES_IN_IDENTITY_PACKET
|
||||||
identityStream << QUuid() << urlToSend << _attachmentData << _displayName << _jointIndices;
|
identityStream << getSessionUUID() << urlToSend << _attachmentData << _displayName << _jointIndices;
|
||||||
#else
|
#else
|
||||||
identityStream << QUuid() << urlToSend << _attachmentData << _displayName;
|
identityStream << getSessionUUID() << urlToSend << _attachmentData << _displayName;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return identityData;
|
return identityData;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void AvatarData::setSkeletonModelURL(const QUrl& skeletonModelURL) {
|
void AvatarData::setSkeletonModelURL(const QUrl& skeletonModelURL) {
|
||||||
const QUrl& expanded = skeletonModelURL.isEmpty() ? AvatarData::defaultFullAvatarModelUrl() : skeletonModelURL;
|
const QUrl& expanded = skeletonModelURL.isEmpty() ? AvatarData::defaultFullAvatarModelUrl() : skeletonModelURL;
|
||||||
if (expanded == _skeletonModelURL) {
|
if (expanded == _skeletonModelURL) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
_skeletonModelURL = expanded;
|
_skeletonModelURL = expanded;
|
||||||
qCDebug(avatars) << "Changing skeleton model for avatar to" << _skeletonModelURL.toString();
|
qCDebug(avatars) << "Changing skeleton model for avatar" << getSessionUUID() << "to" << _skeletonModelURL.toString();
|
||||||
|
|
||||||
updateJointMappings();
|
updateJointMappings();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue