From 57a9d34cdafa15a1c02d9551758398910504d55a Mon Sep 17 00:00:00 2001 From: Dante Ruiz Date: Mon, 30 Jan 2017 18:33:56 +0000 Subject: [PATCH] minimize git diff --- scripts/system/controllers/handControllerGrab.js | 3 +++ scripts/system/edit.js | 1 + 2 files changed, 4 insertions(+) diff --git a/scripts/system/controllers/handControllerGrab.js b/scripts/system/controllers/handControllerGrab.js index f4b760dbce..2efafa504d 100644 --- a/scripts/system/controllers/handControllerGrab.js +++ b/scripts/system/controllers/handControllerGrab.js @@ -1510,6 +1510,7 @@ function MyController(hand) { }; this.entityIsNearGrabbable = function(entityID, handPosition, maxDistance) { + if (!this.entityIsGrabbable(entityID)) { return false; } @@ -2263,6 +2264,7 @@ function MyController(hand) { this.clearEquipHaptics(); this.shouldScale = false; + Controller.triggerHapticPulse(HAPTIC_PULSE_STRENGTH, HAPTIC_PULSE_DURATION, this.hand); if (this.entityActivated) { @@ -2392,6 +2394,7 @@ function MyController(hand) { this.nearGrabbing = function(deltaTime, timestamp) { this.grabPointSphereOff(); + if (this.state == STATE_NEAR_GRABBING && (!this.triggerClicked && this.secondaryReleased())) { this.callEntityMethodOnGrabbed("releaseGrab"); this.setState(STATE_OFF, "trigger released"); diff --git a/scripts/system/edit.js b/scripts/system/edit.js index dccd097817..8f9697b060 100644 --- a/scripts/system/edit.js +++ b/scripts/system/edit.js @@ -191,6 +191,7 @@ var toolBar = (function () { selectionManager.clearSelections(); entityListTool.sendUpdate(); selectionManager.setSelections([entityID]); + return entityID; }