fix bug that caused tablet to be constantly hooked and unhooked from avatar at SpatiallyNestable level

This commit is contained in:
Seth Alves 2019-01-16 13:23:27 -08:00
parent fd09180776
commit 1104e56bc3
3 changed files with 4 additions and 3 deletions

View file

@ -465,8 +465,6 @@ public:
static const QUrl& defaultFullAvatarModelUrl();
virtual bool isMyAvatar() const { return false; }
const QUuid getSessionUUID() const { return getID(); }
glm::vec3 getHandPosition() const;

View file

@ -108,7 +108,8 @@ SpatiallyNestablePointer SpatiallyNestable::getParentPointer(bool& success) cons
return nullptr;
}
if (parent && parent->getID() == parentID) {
if (parent && (parent->getID() == parentID ||
(parentID == AVATAR_SELF_ID && parent->isMyAvatar()))) {
// parent pointer is up-to-date
if (!_parentKnowsMe) {
SpatialParentTree* parentTree = parent->getParentTree();

View file

@ -47,6 +47,8 @@ public:
virtual const QUuid getParentID() const;
virtual void setParentID(const QUuid& parentID);
virtual bool isMyAvatar() const { return false; }
virtual quint16 getParentJointIndex() const { return _parentJointIndex; }
virtual void setParentJointIndex(quint16 parentJointIndex);