mirror of
https://github.com/overte-org/overte.git
synced 2025-04-21 08:04:01 +02:00
remove identity cache code
This commit is contained in:
parent
4511156d7b
commit
ac751029c0
4 changed files with 0 additions and 34 deletions
|
@ -445,24 +445,6 @@ float Avatar::getSimulationRate(const QString& rateName) const {
|
|||
return 0.0f;
|
||||
}
|
||||
|
||||
void Avatar::getIdentity(Identity& identity) const {
|
||||
identity.uuid = getSessionUUID();
|
||||
identity.skeletonModelURL = _skeletonModelURL;
|
||||
identity.attachmentData = _attachmentData;
|
||||
identity.displayName = _displayName;
|
||||
identity.sessionDisplayName = _sessionDisplayName;
|
||||
identity.avatarEntityData = _avatarEntityData;
|
||||
}
|
||||
|
||||
void Avatar::setIdentity(const Identity& identity) {
|
||||
assert(identity.uuid == getSessionUUID());
|
||||
setSkeletonModelURL(identity.skeletonModelURL);
|
||||
_attachmentData = identity.attachmentData;
|
||||
_displayName = identity.displayName;
|
||||
_sessionDisplayName = identity.sessionDisplayName;
|
||||
_avatarEntityData = identity.avatarEntityData;
|
||||
}
|
||||
|
||||
bool Avatar::isLookingAtMe(AvatarSharedPointer avatar) const {
|
||||
const float HEAD_SPHERE_RADIUS = 0.1f;
|
||||
glm::vec3 theirLookAt = dynamic_pointer_cast<Avatar>(avatar)->getHead()->getLookAtPosition();
|
||||
|
|
|
@ -238,9 +238,6 @@ public:
|
|||
return (lerpValue*(4.0f - 2.0f * lerpValue) - 1.0f);
|
||||
}
|
||||
|
||||
void getIdentity(Identity& identity) const;
|
||||
void setIdentity(const Identity& identity);
|
||||
|
||||
public slots:
|
||||
|
||||
// FIXME - these should be migrated to use Pose data instead
|
||||
|
|
|
@ -326,16 +326,6 @@ AvatarSharedPointer AvatarManager::newSharedAvatar() {
|
|||
return std::make_shared<Avatar>(qApp->thread(), std::make_shared<Rig>());
|
||||
}
|
||||
|
||||
AvatarSharedPointer AvatarManager::addAvatar(const QUuid& sessionUUID, const QWeakPointer<Node>& mixerWeakPointer) {
|
||||
AvatarSharedPointer avatarData = AvatarHashMap::addAvatar(sessionUUID, mixerWeakPointer);
|
||||
QMap<QUuid, AvatarData::Identity>::iterator itr = _identityCache.find(sessionUUID);
|
||||
if (itr != _identityCache.end()) {
|
||||
auto avatar = std::static_pointer_cast<Avatar>(avatarData);
|
||||
avatar->setIdentity(*itr);
|
||||
}
|
||||
return avatarData;
|
||||
}
|
||||
|
||||
void AvatarManager::handleRemovedAvatar(const AvatarSharedPointer& removedAvatar, KillAvatarReason removalReason) {
|
||||
AvatarHashMap::handleRemovedAvatar(removedAvatar, removalReason);
|
||||
|
||||
|
@ -347,7 +337,6 @@ void AvatarManager::handleRemovedAvatar(const AvatarSharedPointer& removedAvatar
|
|||
// therefore whenever we remove an avatar we cache the identity in case we need it later
|
||||
AvatarData::Identity identity;
|
||||
avatar->getIdentity(identity);
|
||||
_identityCache[avatar->getSessionUUID()] = identity;
|
||||
|
||||
AvatarMotionState* motionState = avatar->getMotionState();
|
||||
if (motionState) {
|
||||
|
|
|
@ -105,7 +105,6 @@ private:
|
|||
void simulateAvatarFades(float deltaTime);
|
||||
|
||||
AvatarSharedPointer newSharedAvatar() override;
|
||||
AvatarSharedPointer addAvatar(const QUuid& sessionUUID, const QWeakPointer<Node>& mixerWeakPointer) override;
|
||||
void handleRemovedAvatar(const AvatarSharedPointer& removedAvatar, KillAvatarReason removalReason = KillAvatarReason::NoReason) override;
|
||||
|
||||
QVector<AvatarSharedPointer> _avatarsToFade;
|
||||
|
@ -118,7 +117,6 @@ private:
|
|||
quint64 _lastSendAvatarDataTime = 0; // Controls MyAvatar send data rate.
|
||||
|
||||
QVector<AvatarManager::LocalLight> _localLights;
|
||||
QMap<QUuid, AvatarData::Identity> _identityCache;
|
||||
|
||||
bool _shouldShowReceiveStats = false;
|
||||
|
||||
|
|
Loading…
Reference in a new issue