mirror of
https://github.com/JulianGro/overte.git
synced 2025-08-04 07:45:16 +02:00
Merge pull request #12997 from birarda/bug/avatar-mixer-agent-crash
66.1 fix: use the correct joint count for other avatar last sent
This commit is contained in:
commit
a69ded05d8
2 changed files with 4 additions and 5 deletions
|
@ -115,11 +115,7 @@ public:
|
||||||
uint64_t getLastOtherAvatarEncodeTime(QUuid otherAvatar) const;
|
uint64_t getLastOtherAvatarEncodeTime(QUuid otherAvatar) const;
|
||||||
void setLastOtherAvatarEncodeTime(const QUuid& otherAvatar, const uint64_t& time);
|
void setLastOtherAvatarEncodeTime(const QUuid& otherAvatar, const uint64_t& time);
|
||||||
|
|
||||||
QVector<JointData>& getLastOtherAvatarSentJoints(QUuid otherAvatar) {
|
QVector<JointData>& getLastOtherAvatarSentJoints(QUuid otherAvatar) { return _lastOtherAvatarSentJoints[otherAvatar]; }
|
||||||
auto& lastOtherAvatarSentJoints = _lastOtherAvatarSentJoints[otherAvatar];
|
|
||||||
lastOtherAvatarSentJoints.resize(_avatar->getJointCount());
|
|
||||||
return lastOtherAvatarSentJoints;
|
|
||||||
}
|
|
||||||
|
|
||||||
void queuePacket(QSharedPointer<ReceivedMessage> message, SharedNodePointer node);
|
void queuePacket(QSharedPointer<ReceivedMessage> message, SharedNodePointer node);
|
||||||
int processPackets(); // returns number of packets processed
|
int processPackets(); // returns number of packets processed
|
||||||
|
|
|
@ -381,6 +381,9 @@ void AvatarMixerSlave::broadcastAvatarDataToAgent(const SharedNodePointer& node)
|
||||||
bool includeThisAvatar = true;
|
bool includeThisAvatar = true;
|
||||||
auto lastEncodeForOther = nodeData->getLastOtherAvatarEncodeTime(otherNode->getUUID());
|
auto lastEncodeForOther = nodeData->getLastOtherAvatarEncodeTime(otherNode->getUUID());
|
||||||
QVector<JointData>& lastSentJointsForOther = nodeData->getLastOtherAvatarSentJoints(otherNode->getUUID());
|
QVector<JointData>& lastSentJointsForOther = nodeData->getLastOtherAvatarSentJoints(otherNode->getUUID());
|
||||||
|
|
||||||
|
lastSentJointsForOther.resize(otherAvatar->getJointCount());
|
||||||
|
|
||||||
bool distanceAdjust = true;
|
bool distanceAdjust = true;
|
||||||
glm::vec3 viewerPosition = myPosition;
|
glm::vec3 viewerPosition = myPosition;
|
||||||
AvatarDataPacket::HasFlags hasFlagsOut; // the result of the toByteArray
|
AvatarDataPacket::HasFlags hasFlagsOut; // the result of the toByteArray
|
||||||
|
|
Loading…
Reference in a new issue