Enable transmission of jointIndices

This commit is contained in:
Anthony J. Thibault 2016-05-18 18:19:28 -07:00
parent 0294066668
commit de1204c42d
2 changed files with 9 additions and 3 deletions

View file

@ -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

View file

@ -128,6 +128,8 @@ enum KeyState {
DELETE_KEY_DOWN
};
#define TRANSMIT_JOINT_INDICES_IN_IDENTITY_PACKET
class QDataStream;
class AttachmentData;