mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 23:57:13 +02:00
cr-r1
This commit is contained in:
parent
422c70f300
commit
61e4155eda
1 changed files with 4 additions and 3 deletions
|
@ -156,11 +156,11 @@ function getDistance(uuid, checkAvatar, shouldSave) {
|
||||||
|
|
||||||
// Quick check for distance from avatar
|
// Quick check for distance from avatar
|
||||||
function quickDistanceCheckForNonSelectedAvatars(uuid) {
|
function quickDistanceCheckForNonSelectedAvatars(uuid) {
|
||||||
var eye = MyAvatar.position;
|
var source = MyAvatar.position;
|
||||||
|
|
||||||
var target = AvatarManager.getAvatar(uuid).position;
|
var target = AvatarManager.getAvatar(uuid).position;
|
||||||
|
|
||||||
var avatarDistance = Vec3.distance(target, eye);
|
var avatarDistance = Vec3.distance(target, source);
|
||||||
|
|
||||||
return avatarDistance;
|
return avatarDistance;
|
||||||
}
|
}
|
||||||
|
@ -211,6 +211,7 @@ function handleAlwaysOnMode(shouldTurnOnAlwaysOnMode) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
maybeClearAlwaysOnAvatarDistanceCheck();
|
||||||
alwaysOnAvatarDistanceCheck = Script.setInterval(maybeAddOrRemoveIntervalCheck, DISTANCE_CHECK_INTERVAL_MS);
|
alwaysOnAvatarDistanceCheck = Script.setInterval(maybeAddOrRemoveIntervalCheck, DISTANCE_CHECK_INTERVAL_MS);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -549,7 +550,7 @@ function create() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Destory the manager
|
// Destroy the manager
|
||||||
function destroy() {
|
function destroy() {
|
||||||
_this.reset();
|
_this.reset();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue