History

Don't immediately hide occlusion highlights after teleporting

David Rowe committed 8 years ago

Commit 84a06fb1 parent 2f3a9411 file · +5 −8Browse files

Showing the changes to scripts/system/controllers/controllerModules (1 of 1 file). Show all

Unified · Split

scripts/system/controllers/controllerModules/teleport.js+5−8
@@ -427,7 +427,6 @@ Script.include("/~/system/libraries/controllers.js"); · 426 unmodified lines
427427 dimensions: _this.PLAY_AREA_SENSOR_OVERLAY_DIMENSIONS,
428428 parentID: _this.playAreaOverlay,
429429 localRotation: _this.PLAY_AREA_SENSOR_OVERLAY_ROTATION,
430− solid: true,
431430 drawInFront: false,
432431 visible: false
433432 });
@@ -581,6 +580,7 @@ Script.include("/~/system/libraries/controllers.js"); · 147 unmodified lines
581580 }
582581 }
583582 _this.teleportedFadeTimer = null;
583+ Selection.disableListHighlight(this.teleporterSelectionName);
584584 }
585585 };
586586
@@ -619,6 +619,7 @@ Script.include("/~/system/libraries/controllers.js"); · 32 unmodified lines
619619 this.teleportScaleStart = Date.now();
620620 this.teleportScaleFactor = 0;
621621 this.scaleInTeleport();
622+ Selection.enableListHighlight(this.teleporterSelectionName, this.TELEPORTER_SELECTION_STYLE);
622623 } else {
623624 if (this.teleportScaleTimer !== null) {
624625 Script.clearTimeout(this.teleportScaleTimer);
@@ -644,6 +645,8 @@ Script.include("/~/system/libraries/controllers.js"); · 19 unmodified lines
644645 this.teleportedFadeDelayFactor = 1.0;
645646 this.teleportedFadeFactor = 1.0;
646647 this.teleportedFadeTimer = Script.setTimeout(this.fadeOutTeleport, this.TELEPORTED_FADE_DELAY);
648+ } else {
649+ Selection.disableListHighlight(this.teleporterSelectionName);
647650 }
648651 }
649652
@@ -798,7 +801,6 @@ Script.include("/~/system/libraries/controllers.js"); · 148 unmodified lines
798801 this.disableLasers = function() {
799802 this.setPlayAreaVisible(false, null, true);
800803 this.setTeleportVisible(false, null, true);
801− Selection.disableListHighlight(this.teleporterSelectionName);
802804 Pointers.disablePointer(_this.teleportParabolaHandVisuals);
803805 Pointers.disablePointer(_this.teleportParabolaHandCollisions);
804806 Pointers.disablePointer(_this.teleportParabolaHeadVisuals);
@@ -816,12 +818,6 @@ Script.include("/~/system/libraries/controllers.js"); · 11 unmodified lines
816818 }
817819 this.teleportState = teleportState;
818820
819− var visible = visibleState === "teleport";
820− if (visible) {
821− Selection.enableListHighlight(this.teleporterSelectionName, this.TELEPORTER_SELECTION_STYLE);
822− } else {
823− Selection.disableListHighlight(this.teleporterSelectionName);
824− }
825821 var pointerID;
826822 if (mode === 'head') {
827823 Pointers.setRenderState(_this.teleportParabolaHeadVisuals, visibleState);
@@ -832,6 +828,7 @@ Script.include("/~/system/libraries/controllers.js"); · 4 unmodified lines
832828 Pointers.setRenderState(_this.teleportParabolaHandCollisions, invisibleState);
833829 pointerID = _this.teleportParabolaHandVisuals;
834830 }
831+ var visible = visibleState === "teleport";
835832 this.setPlayAreaVisible(visible && MyAvatar.showPlayArea,
836833 Pointers.getPointerProperties(pointerID).renderStates.teleport.end, false);
837834 this.setTeleportVisible(visible, mode, false);