mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-08 21:42:13 +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) {
|
||||
// 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) {
|
||||
manager.updateRelativeOffsets(parsedMessage.grabbedEntity);
|
||||
manager.updateRelativeOffsets(grabbedEntity);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -185,8 +185,8 @@ function AttachedEntitiesManager() {
|
|||
parentJointIndex: bestJointIndex
|
||||
};
|
||||
|
||||
if (bestJointOffset && bestJointOffset.constructor === Array && bestJointOffset.length > 1) {
|
||||
if (this.avatarIsInDressingRoom()) {
|
||||
if (bestJointOffset && bestJointOffset.constructor === Array) {
|
||||
if (this.avatarIsInDressingRoom() || bestJointOffset.length < 2) {
|
||||
this.updateRelativeOffsets(grabbedEntity);
|
||||
} else {
|
||||
// don't snap the entity to the preferred position if the avatar is in the dressing room.
|
||||
|
|
Loading…
Reference in a new issue