mirror of
https://github.com/overte-org/overte.git
synced 2025-08-10 02:03:11 +02:00
changes so that avatar-mixer wont attempt to resolve a parentID
This commit is contained in:
parent
af10fd3b36
commit
135f25bde7
1 changed files with 8 additions and 8 deletions
|
@ -216,15 +216,13 @@ QByteArray AvatarData::toByteArray(bool cullSmallChanges, bool sendAll) {
|
||||||
setAtBit(bitItems, IS_EYE_TRACKER_CONNECTED);
|
setAtBit(bitItems, IS_EYE_TRACKER_CONNECTED);
|
||||||
}
|
}
|
||||||
// referential state
|
// referential state
|
||||||
bool success;
|
if (!getParentID().isNull()) {
|
||||||
SpatiallyNestablePointer parent = getParentPointer(success);
|
|
||||||
if (parent && success) {
|
|
||||||
setAtBit(bitItems, HAS_REFERENTIAL);
|
setAtBit(bitItems, HAS_REFERENTIAL);
|
||||||
}
|
}
|
||||||
*destinationBuffer++ = bitItems;
|
*destinationBuffer++ = bitItems;
|
||||||
|
|
||||||
if (parent) {
|
if (!getParentID().isNull()) {
|
||||||
QByteArray referentialAsBytes = parent->getID().toRfc4122();
|
QByteArray referentialAsBytes = getParentID().toRfc4122();
|
||||||
memcpy(destinationBuffer, referentialAsBytes.data(), referentialAsBytes.size());
|
memcpy(destinationBuffer, referentialAsBytes.data(), referentialAsBytes.size());
|
||||||
destinationBuffer += referentialAsBytes.size();
|
destinationBuffer += referentialAsBytes.size();
|
||||||
memcpy(destinationBuffer, &_parentJointIndex, sizeof(_parentJointIndex));
|
memcpy(destinationBuffer, &_parentJointIndex, sizeof(_parentJointIndex));
|
||||||
|
@ -492,10 +490,12 @@ int AvatarData::parseDataFromBuffer(const QByteArray& buffer) {
|
||||||
// avatar's SkeletonModel might fall into the CPU expensive part of Model::updateClusterMatrices() when otherwise it
|
// avatar's SkeletonModel might fall into the CPU expensive part of Model::updateClusterMatrices() when otherwise it
|
||||||
// would not have required it. However, we know we can update many simultaneously animating avatars, and most
|
// would not have required it. However, we know we can update many simultaneously animating avatars, and most
|
||||||
// avatars will be moving constantly anyway, so I don't think we need to worry.
|
// avatars will be moving constantly anyway, so I don't think we need to worry.
|
||||||
if (getBodyYaw() != yaw || getBodyPitch() != pitch || getBodyRoll() != roll) {
|
glm::quat currentOrientation = getLocalOrientation();
|
||||||
|
glm::vec3 newEulerAngles(pitch, yaw, roll);
|
||||||
|
glm::quat newOrientation = glm::quat(glm::radians(newEulerAngles));
|
||||||
|
if (currentOrientation != newOrientation) {
|
||||||
_hasNewJointRotations = true;
|
_hasNewJointRotations = true;
|
||||||
glm::vec3 eulerAngles(pitch, yaw, roll);
|
setLocalOrientation(newOrientation);
|
||||||
setLocalOrientation(glm::quat(glm::radians(eulerAngles)));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// scale
|
// scale
|
||||||
|
|
Loading…
Reference in a new issue