Merge branch 'stable' of https://github.com/highfidelity/hifi into new-master

This commit is contained in:
Atlante45 2017-10-10 16:53:34 -07:00
commit 6dd49f5c32
4 changed files with 10 additions and 8 deletions

View file

@ -78,6 +78,7 @@ protected:
// Will be called by the lambda posted to the scene in updateInScene. // Will be called by the lambda posted to the scene in updateInScene.
// This function will execute on the rendering thread, so you cannot use network caches to fetch // This function will execute on the rendering thread, so you cannot use network caches to fetch
// data in this method if using multi-threaded rendering // data in this method if using multi-threaded rendering
virtual void doRenderUpdateAsynchronous(const EntityItemPointer& entity) { } virtual void doRenderUpdateAsynchronous(const EntityItemPointer& entity) { }
// Called by the `render` method after `needsRenderUpdate` // Called by the `render` method after `needsRenderUpdate`

View file

@ -436,7 +436,6 @@ Script.include("/~/system/libraries/controllers.js");
this.distanceRotating = false; this.distanceRotating = false;
if (controllerData.triggerValues[this.hand] > TRIGGER_ON_VALUE) { if (controllerData.triggerValues[this.hand] > TRIGGER_ON_VALUE) {
this.updateLaserPointer(controllerData);
this.prepareDistanceRotatingData(controllerData); this.prepareDistanceRotatingData(controllerData);
return makeRunningValues(true, [], []); return makeRunningValues(true, [], []);
} else { } else {

View file

@ -248,17 +248,20 @@ Script.include("/~/system/libraries/controllers.js");
} }
}; };
this.nearGrabWantsToRun = function(controllerData) { this.otherModuleNeedsToRun = function(controllerData) {
var moduleName = this.hand === RIGHT_HAND ? "RightNearParentingGrabOverlay" : "LeftNearParentingGrabOverlay"; var grabOverlayModuleName = this.hand === RIGHT_HAND ? "RightNearParentingGrabOverlay" : "LeftNearParentingGrabOverlay";
var module = getEnabledModuleByName(moduleName); var grabOverlayModule = getEnabledModuleByName(grabOverlayModuleName);
var ready = module ? module.isReady(controllerData) : makeRunningValues(false, [], []); var grabOverlayModuleReady = grabOverlayModule ? grabOverlayModule.isReady(controllerData) : makeRunningValues(false, [], []);
return ready.active; var farGrabModuleName = this.hand === RIGHT_HAND ? "RightFarActionGrabEntity" : "LeftFarActionGrabEntity";
var farGrabModule = getEnabledModuleByName(farGrabModuleName);
var farGrabModuleReady = farGrabModule ? farGrabModule.isReady(controllerData) : makeRunningValues(false, [], []);
return grabOverlayModuleReady.active || farGrabModuleReady.active;
}; };
this.processStylus = function(controllerData) { this.processStylus = function(controllerData) {
this.updateStylusTip(); this.updateStylusTip();
if (!this.stylusTip.valid || this.overlayLaserActive(controllerData) || this.nearGrabWantsToRun(controllerData)) { if (!this.stylusTip.valid || this.overlayLaserActive(controllerData) || this.otherModuleNeedsToRun(controllerData)) {
this.pointFinger(false); this.pointFinger(false);
this.hideStylus(); this.hideStylus();
return false; return false;

View file

@ -3877,7 +3877,6 @@ SelectionDisplay = (function() {
if (controllerPose.valid && lastControllerPoses[hand].valid) { if (controllerPose.valid && lastControllerPoses[hand].valid) {
if (!Vec3.equal(controllerPose.position, lastControllerPoses[hand].position) || if (!Vec3.equal(controllerPose.position, lastControllerPoses[hand].position) ||
!Vec3.equal(controllerPose.rotation, lastControllerPoses[hand].rotation)) { !Vec3.equal(controllerPose.rotation, lastControllerPoses[hand].rotation)) {
print("setting controller pose");
that.mouseMoveEvent({}); that.mouseMoveEvent({});
} }
} }