From 60a566768a1cf96ca485309202a1218d0de0e081 Mon Sep 17 00:00:00 2001 From: Thijs Wenker Date: Wed, 20 Sep 2017 14:39:13 -0700 Subject: [PATCH 1/2] removed debug spam from makeUserConnection, to reactivate it set `Settings.setValue('MAKE_USER_CONNECTION_DEBUG', true);` and reload the script --- scripts/system/makeUserConnection.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/system/makeUserConnection.js b/scripts/system/makeUserConnection.js index d95ad919b6..51390d4a78 100644 --- a/scripts/system/makeUserConnection.js +++ b/scripts/system/makeUserConnection.js @@ -16,6 +16,7 @@ var request = Script.require('request').request; + var WANT_DEBUG = Settings.getValue('MAKE_USER_CONNECTION_DEBUG', false); var LABEL = "makeUserConnection"; var MAX_AVATAR_DISTANCE = 0.2; // m var GRIP_MIN = 0.75; // goes from 0-1, so 75% pressed is pressed @@ -120,6 +121,9 @@ var successfulHandshakeSound; function debug() { + if (!WANT_DEBUG) { + return; + } var stateString = "<" + STATE_STRINGS[state] + ">"; var connecting = "[" + connectingId + "/" + connectingHandJointIndex + "]"; var current = "[" + currentHand + "/" + currentHandJointIndex + "]" @@ -372,7 +376,7 @@ var myHeadIndex = MyAvatar.getJointIndex("Head"); var otherHeadIndex = avatar.getJointIndex("Head"); var diff = (avatar.getJointPosition(otherHeadIndex).y - MyAvatar.getJointPosition(myHeadIndex).y) / 2; - print("head height difference: " + diff); + debug("head height difference: " + diff); updateAnimationData(diff); } } From 7ea1968b337f0e32c9d9e60cdc4c003fa1c6d562 Mon Sep 17 00:00:00 2001 From: Thijs Wenker Date: Wed, 20 Sep 2017 14:59:15 -0700 Subject: [PATCH 2/2] Tip, `Code Writer` which comes standard with Windows 10, does enter tabs by default when using the tab key. >=) --- scripts/system/makeUserConnection.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/system/makeUserConnection.js b/scripts/system/makeUserConnection.js index 51390d4a78..bfad959ffc 100644 --- a/scripts/system/makeUserConnection.js +++ b/scripts/system/makeUserConnection.js @@ -16,7 +16,7 @@ var request = Script.require('request').request; - var WANT_DEBUG = Settings.getValue('MAKE_USER_CONNECTION_DEBUG', false); + var WANT_DEBUG = Settings.getValue('MAKE_USER_CONNECTION_DEBUG', false); var LABEL = "makeUserConnection"; var MAX_AVATAR_DISTANCE = 0.2; // m var GRIP_MIN = 0.75; // goes from 0-1, so 75% pressed is pressed @@ -121,9 +121,9 @@ var successfulHandshakeSound; function debug() { - if (!WANT_DEBUG) { - return; - } + if (!WANT_DEBUG) { + return; + } var stateString = "<" + STATE_STRINGS[state] + ">"; var connecting = "[" + connectingId + "/" + connectingHandJointIndex + "]"; var current = "[" + currentHand + "/" + currentHandJointIndex + "]"