removed debug spam from makeUserConnection, to reactivate it set Settings.setValue('MAKE_USER_CONNECTION_DEBUG', true); and reload the script

This commit is contained in:
Thijs Wenker 2017-09-20 14:39:13 -07:00
parent 4a95023a2d
commit 60a566768a

View file

@ -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);
}
}