From a08346719ce7e231225786effa8b3d8c54d41d23 Mon Sep 17 00:00:00 2001 From: David Kelly Date: Thu, 23 Mar 2017 10:29:45 -0700 Subject: [PATCH] one bit of defensive code, plus some temporary logging --- scripts/system/makeUserConnection.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/system/makeUserConnection.js b/scripts/system/makeUserConnection.js index a9d2653146..e750c7179f 100644 --- a/scripts/system/makeUserConnection.js +++ b/scripts/system/makeUserConnection.js @@ -234,6 +234,8 @@ function updateVisualization() { if (state == STATES.inactive) { deleteParticleEffect(); deleteMakeConnectionParticleEffect(); + // this should always be true if inactive, but just in case: + currentHand = undefined; return; } @@ -414,6 +416,7 @@ function updateTriggers(value, fromKeyboard, hand) { // ok now, we are either initiating or quitting... var isGripping = value > GRIP_MIN; if (isGripping) { + debug("updateTriggers called - gripping", handToString(hand)); if (state != STATES.inactive) { return; } else { @@ -421,6 +424,7 @@ function updateTriggers(value, fromKeyboard, hand) { } } else { // TODO: should we end handshake even when inactive? Ponder + debug("updateTriggers called -- no longer gripping", handToString(hand)); if (state != STATES.inactive) { endHandshake(); } else {