mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 14:29:03 +02:00
CR feedback
This commit is contained in:
parent
b3eb87e8db
commit
1309af6d7a
3 changed files with 8 additions and 4 deletions
|
@ -114,7 +114,9 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
QVector<JointData>& getLastOtherAvatarSentJoints(QUuid otherAvatar) {
|
QVector<JointData>& getLastOtherAvatarSentJoints(QUuid otherAvatar) {
|
||||||
return _lastOtherAvatarSentJoints[otherAvatar];
|
auto result = _lastOtherAvatarSentJoints[otherAvatar];
|
||||||
|
result.resize(_avatar->getJointCount());
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -429,9 +429,7 @@ QByteArray AvatarData::toByteArray(AvatarDataDetail dataDetail, quint64 lastSent
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (sentJointDataOut) {
|
if (sentJointDataOut) {
|
||||||
if (sentJointDataOut->size() != _jointData.size()) {
|
sentJointDataOut->resize(_jointData.size()); // Make sure the destination is resized before using it
|
||||||
sentJointDataOut->resize(_jointData.size());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
float minRotationDOT = !distanceAdjust ? AVATAR_MIN_ROTATION_DOT : getDistanceBasedMinRotationDOT(viewerPosition);
|
float minRotationDOT = !distanceAdjust ? AVATAR_MIN_ROTATION_DOT : getDistanceBasedMinRotationDOT(viewerPosition);
|
||||||
|
|
||||||
|
@ -1538,6 +1536,7 @@ void AvatarData::sendAvatarDataPacket() {
|
||||||
QVector<JointData> lastSentJointData;
|
QVector<JointData> lastSentJointData;
|
||||||
{
|
{
|
||||||
QReadLocker readLock(&_jointDataLock);
|
QReadLocker readLock(&_jointDataLock);
|
||||||
|
_lastSentJointData.resize(_jointData.size());
|
||||||
lastSentJointData = _lastSentJointData;
|
lastSentJointData = _lastSentJointData;
|
||||||
}
|
}
|
||||||
QByteArray avatarByteArray = toByteArray(dataDetail, 0, lastSentJointData);
|
QByteArray avatarByteArray = toByteArray(dataDetail, 0, lastSentJointData);
|
||||||
|
|
|
@ -536,8 +536,11 @@ public:
|
||||||
|
|
||||||
float getDataRate(const QString& rateName = QString(""));
|
float getDataRate(const QString& rateName = QString(""));
|
||||||
|
|
||||||
|
int getJointCount() { return _jointData.size(); }
|
||||||
|
|
||||||
QVector<JointData> getLastSentJointData() {
|
QVector<JointData> getLastSentJointData() {
|
||||||
QReadLocker readLock(&_jointDataLock);
|
QReadLocker readLock(&_jointDataLock);
|
||||||
|
_lastSentJointData.resize(_jointData.size());
|
||||||
return _lastSentJointData;
|
return _lastSentJointData;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue