From f6984aaff80f81bd469661bdcd3b7162fe8605d6 Mon Sep 17 00:00:00 2001 From: "James B. Pollack" Date: Tue, 2 Aug 2016 14:42:21 -0700 Subject: [PATCH] clear timeout one more place --- .../controllers/handControllerPointer.js | 24 +++++++++++++++++++ scripts/system/controllers/teleport.js | 4 +++- 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/scripts/system/controllers/handControllerPointer.js b/scripts/system/controllers/handControllerPointer.js index dab6438efa..3f1fbb27de 100644 --- a/scripts/system/controllers/handControllerPointer.js +++ b/scripts/system/controllers/handControllerPointer.js @@ -509,3 +509,27 @@ Script.scriptEnding.connect(function () { OffscreenFlags.navigationFocusDisabled = false; }); +var isDisabled = false; +var handleHandMessages = function(channel, message, sender) { + var data; + if (sender === MyAvatar.sessionUUID) { + if (channel === 'Hifi-Hand-Pointer-Disabler') { + if (message === 'both') { + isDisabled = 'both'; + } + if (message === 'left') { + isDisabled = 'left'; + } + if (message === 'right') { + isDisabled = 'right' + } + if (message === 'none') { + isDisabled = false; + } + + } + } +} + +Messages.subscribe('Hifi-Hand-Pointer-Disabler'); +Messages.messageReceived.connect(handleHandMessages); \ No newline at end of file diff --git a/scripts/system/controllers/teleport.js b/scripts/system/controllers/teleport.js index d32eb77d34..d8c56b36ca 100644 --- a/scripts/system/controllers/teleport.js +++ b/scripts/system/controllers/teleport.js @@ -221,13 +221,15 @@ function Teleporter() { } this.exitTeleportMode = function(value) { + if(activationTimeout!==null){ + Script.clearTimeout(activationTimeout); + } if (this.updateConnected === true) { Script.update.disconnect(this.update); } this.disableMappings(); this.turnOffOverlayBeams(); - this.updateConnected = null; Script.setTimeout(function() {