History

some small bug fixes

druiz17 committed 9 years ago

Commit f0c12e51 parent ef050a04 files · +11 −6Browse files

Showing the changes to scripts/system/controllers/controllerModules (3 of 4 files). Show all

Unified · Split

3 files
  1. scripts/system/controllers/controllerModules/nearActionGrabEntity.js +3 −3
  2. scripts/system/controllers/controllerModules/nearParentGrabOverlay.js +2 −1
  3. scripts/system/controllers/controllerModules/overlayLaserInput.js +4 −1
scripts/system/controllers/controllerModules/nearActionGrabEntity.js+3−3
@@ -167,7 +167,7 @@ Script.include("/~/system/libraries/cloneEntityUtils.js"); · 166 unmodified lines
167 this.isReady = function (controllerData) {167 this.isReady = function (controllerData) {
168 this.targetEntityID = null;168 this.targetEntityID = null;
169 169
170 if (controllerData.triggerValues[this.hand] < TRIGGER_OFF_VALUE) {170 if (controllerData.triggerValues[this.hand] < TRIGGER_OFF_VALUE && controllerData.secondaryValues[this.hand] < TRIGGER_OFF_VALUE) {
171 return makeRunningValues(false, [], []);171 return makeRunningValues(false, [], []);
172 }172 }
173 173
@@ -186,7 +186,7 @@ Script.include("/~/system/libraries/cloneEntityUtils.js"); · 12 unmodified lines
186 186
187 this.run = function (controllerData) {187 this.run = function (controllerData) {
188 if (this.actionID) {188 if (this.actionID) {
189 if (controllerData.triggerClicks[this.hand] === 0) {189 if (controllerData.triggerClicks[this.hand] === 0 && controllerData.secondaryValues[this.hand] === 0) {
190 this.endNearGrabAction();190 this.endNearGrabAction();
191 return makeRunningValues(false, [], []);191 return makeRunningValues(false, [], []);
192 }192 }
@@ -204,7 +204,7 @@ Script.include("/~/system/libraries/cloneEntityUtils.js"); · 11 unmodified lines
204 204
205 var targetProps = this.getTargetProps(controllerData);205 var targetProps = this.getTargetProps(controllerData);
206 if (targetProps) {206 if (targetProps) {
207 if (controllerData.triggerClicks[this.hand] === 1) {207 if (controllerData.triggerClicks[this.hand] === 1 || controllerData.secondaryValues[this.hand] === 1) {
208 // switch to grabbing208 // switch to grabbing
209 var targetCloneable = entityIsCloneable(targetProps);209 var targetCloneable = entityIsCloneable(targetProps);
210 if (targetCloneable) {210 if (targetCloneable) {
scripts/system/controllers/controllerModules/nearParentGrabOverlay.js+2−1
@@ -128,7 +128,8 @@ var GRAB_RADIUS = 0.35; · 127 unmodified lines
128 };128 };
129 129
130 this.endNearParentingGrabOverlay = function () {130 this.endNearParentingGrabOverlay = function () {
131 if (this.previousParentID[this.grabbedThingID] === NULL_UUID) {131 var previousParentID = this.previousParentID[this.grabbedThingID];
132 if (previousParentID === NULL_UUID || previousParentID === null || previousParentID === undefined) {
132 Overlays.editOverlay(this.grabbedThingID, {133 Overlays.editOverlay(this.grabbedThingID, {
133 parentID: NULL_UUID,134 parentID: NULL_UUID,
134 parentJointIndex: -1135 parentJointIndex: -1
scripts/system/controllers/controllerModules/overlayLaserInput.js+4−1
@@ -429,8 +429,11 @@ Script.include("/~/system/libraries/controllers.js"); · 428 unmodified lines
429 429
430 this.shouldExit = function(controllerData) {430 this.shouldExit = function(controllerData) {
431 var intersection = controllerData.rayPicks[this.hand];431 var intersection = controllerData.rayPicks[this.hand];
432 var nearGrabName = this.hand === RIGHT_HAND ? "RightNearParentingGrabOverlay" : "LeftNearParentingGrabOverlay";
433 var nearGrabModule = getEnabledModuleByName(nearGrabName);
434 var status = nearGrabModule ? nearGrabModule.isReady(controllerData) : makeRunningValues(false, [], []);
432 var offOverlay = (intersection.type !== RayPick.INTERSECTED_OVERLAY);435 var offOverlay = (intersection.type !== RayPick.INTERSECTED_OVERLAY);
433 return offOverlay;436 return offOverlay || status.active;
434 };437 };
435 438
436 this.exitModule = function() {439 this.exitModule = function() {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t