mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 04:44:11 +02:00
Enable transmission of jointIndices
This commit is contained in:
parent
0294066668
commit
de1204c42d
2 changed files with 9 additions and 3 deletions
|
@ -37,7 +37,7 @@
|
|||
|
||||
#include "AvatarLogging.h"
|
||||
|
||||
#define WANT_DEBUG
|
||||
//#define WANT_DEBUG
|
||||
|
||||
quint64 DEFAULT_FILTERED_LOG_EXPIRY = 2 * USECS_PER_SECOND;
|
||||
|
||||
|
@ -984,11 +984,15 @@ bool AvatarData::processAvatarIdentity(const Identity& identity) {
|
|||
|
||||
#ifdef TRANSMIT_JOINT_INDICES_IN_IDENTITY_PACKET
|
||||
if (!_jointIndices.empty() && _networkJointIndexMap.empty() && !identity.jointIndices.empty()) {
|
||||
|
||||
// build networkJointIndexMap from _jointIndices and networkJointIndices.
|
||||
_networkJointIndexMap.fill(identity.jointIndices.size(), -1);
|
||||
_networkJointIndexMap.fill(-1, identity.jointIndices.size());
|
||||
for (auto iter = identity.jointIndices.cbegin(); iter != identity.jointIndices.end(); ++iter) {
|
||||
int jointIndex = getJointIndex(iter.key());
|
||||
_networkJointIndexMap[iter.value()] = jointIndex;
|
||||
int networkJointIndex = iter.value();
|
||||
if (networkJointIndex >= 0 && networkJointIndex < identity.jointIndices.size()) {
|
||||
_networkJointIndexMap[networkJointIndex - 1] = jointIndex;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -128,6 +128,8 @@ enum KeyState {
|
|||
DELETE_KEY_DOWN
|
||||
};
|
||||
|
||||
#define TRANSMIT_JOINT_INDICES_IN_IDENTITY_PACKET
|
||||
|
||||
class QDataStream;
|
||||
|
||||
class AttachmentData;
|
||||
|
|
Loading…
Reference in a new issue