moving comment locations inside conditionals

This commit is contained in:
Wayne Chen 2018-09-12 11:03:00 -07:00 committed by GitHub
parent acf34dcfdf
commit 521361293a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -144,12 +144,12 @@ Script.include("/~/system/libraries/controllers.js");
var isTriggerPressed = controllerData.triggerValues[this.hand] > TRIGGER_OFF_VALUE;
var laserOn = isTriggerPressed || this.parameters.handLaser.allwaysOn;
if (allowThisModule) {
// if trigger is down + not pointing at a web entity, keep running web surface laser
if (isTriggerPressed && !this.isPointingAtTriggerable(controllerData, isTriggerPressed, true)) {
// if trigger is down + not pointing at a web entity, keep running web surface laser
this.running = true;
return makeRunningValues(true, [], []);
// if trigger is down + pointing at a web entity/overlay, keep running web surface laser
} else if (laserOn && this.isPointingAtTriggerable(controllerData, isTriggerPressed, false)) {
// if trigger is down + pointing at a web entity/overlay, keep running web surface laser
this.running = true;
return makeRunningValues(true, [], []);
} else {