From c3d736dd16c1543413c523827ae3a6d36a34368a Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Tue, 20 Dec 2016 14:30:08 -0800 Subject: [PATCH] return after release, duh --- scripts/system/controllers/handControllerGrab.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/system/controllers/handControllerGrab.js b/scripts/system/controllers/handControllerGrab.js index 628d568ddd..5f42882194 100644 --- a/scripts/system/controllers/handControllerGrab.js +++ b/scripts/system/controllers/handControllerGrab.js @@ -1088,13 +1088,15 @@ function MyController(hand) { }; this.secondaryReleased = function() { - return _this.rawSecondaryValue < BUMPER_ON_VALUE; + var released = _this.rawSecondaryValue < BUMPER_ON_VALUE; - if (_this.state == STATE_HOLD) { + if (released) { // if we were holding something, the release of the // secondary trigger releases it _this.release(); } + + return released; }; // this.triggerOrsecondarySqueezed = function () {