mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 19:59:28 +02:00
Fix for "cannot access member `sessionUUID' of deleted QObject" error
This commit is contained in:
parent
28e8bb69ec
commit
3ceac7d071
1 changed files with 3 additions and 2 deletions
|
@ -26,6 +26,7 @@ var POSSIBLE_AC_AVATARS = [
|
||||||
|
|
||||||
AvatarFinderBeacon = function(avatar) {
|
AvatarFinderBeacon = function(avatar) {
|
||||||
var visible = false;
|
var visible = false;
|
||||||
|
var avatarSessionUUID = avatar.sessionUUID;
|
||||||
this.overlay = Overlays.addOverlay('line3d', {
|
this.overlay = Overlays.addOverlay('line3d', {
|
||||||
color: BEAM_COLOR,
|
color: BEAM_COLOR,
|
||||||
dashed: false,
|
dashed: false,
|
||||||
|
@ -35,7 +36,7 @@ AvatarFinderBeacon = function(avatar) {
|
||||||
visible: visible,
|
visible: visible,
|
||||||
drawInFront: SHOW_THROUGH_WALLS,
|
drawInFront: SHOW_THROUGH_WALLS,
|
||||||
ignoreRayIntersection: true,
|
ignoreRayIntersection: true,
|
||||||
parentID: avatar.sessionUUID,
|
parentID: avatarSessionUUID,
|
||||||
parentJointIndex: -2
|
parentJointIndex: -2
|
||||||
});
|
});
|
||||||
this.cleanup = function() {
|
this.cleanup = function() {
|
||||||
|
@ -45,7 +46,7 @@ AvatarFinderBeacon = function(avatar) {
|
||||||
return (Vec3.distance(MyAvatar.position, avatar.position) >= MIN_DISPLAY_DISTANCE);
|
return (Vec3.distance(MyAvatar.position, avatar.position) >= MIN_DISPLAY_DISTANCE);
|
||||||
};
|
};
|
||||||
this.update = function() {
|
this.update = function() {
|
||||||
avatar = AvatarList.getAvatar(avatar.sessionUUID);
|
avatar = AvatarList.getAvatar(avatarSessionUUID);
|
||||||
Overlays.editOverlay(this.overlay, {
|
Overlays.editOverlay(this.overlay, {
|
||||||
visible: this.shouldShow()
|
visible: this.shouldShow()
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue