mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 08:49:05 +02:00
fix auto-updating of adjustments to worn or equipped entities
This commit is contained in:
parent
ca5525cc3f
commit
94bc1764a8
1 changed files with 4 additions and 4 deletions
|
@ -144,9 +144,9 @@ function AttachedEntitiesManager() {
|
||||||
|
|
||||||
this.handleEntityRelease = function(grabbedEntity, releasedFromJoint) {
|
this.handleEntityRelease = function(grabbedEntity, releasedFromJoint) {
|
||||||
// if this is still equipped, just rewrite the position information.
|
// if this is still equipped, just rewrite the position information.
|
||||||
var grabData = getEntityCustomData('grabKey', entityID, {});
|
var grabData = getEntityCustomData('grabKey', grabbedEntity, {});
|
||||||
if ("refCount" in grabData && grabData.refCount > 0) {
|
if ("refCount" in grabData && grabData.refCount > 0) {
|
||||||
manager.updateRelativeOffsets(parsedMessage.grabbedEntity);
|
manager.updateRelativeOffsets(grabbedEntity);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -185,8 +185,8 @@ function AttachedEntitiesManager() {
|
||||||
parentJointIndex: bestJointIndex
|
parentJointIndex: bestJointIndex
|
||||||
};
|
};
|
||||||
|
|
||||||
if (bestJointOffset && bestJointOffset.constructor === Array && bestJointOffset.length > 1) {
|
if (bestJointOffset && bestJointOffset.constructor === Array) {
|
||||||
if (this.avatarIsInDressingRoom()) {
|
if (this.avatarIsInDressingRoom() || bestJointOffset.length < 2) {
|
||||||
this.updateRelativeOffsets(grabbedEntity);
|
this.updateRelativeOffsets(grabbedEntity);
|
||||||
} else {
|
} else {
|
||||||
// don't snap the entity to the preferred position if the avatar is in the dressing room.
|
// don't snap the entity to the preferred position if the avatar is in the dressing room.
|
||||||
|
|
Loading…
Reference in a new issue