History

Replace usages of AVATAR_SELF_ID previously missed

David Rowe committed 9 years ago

Commit 8d4e9791 parent ed1c97413 files · +39 −41Browse files

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

Unified · Split

11 files
  1. scripts/system/controllers/controllerModules/equipEntity.js +2 −2
  2. scripts/system/controllers/controllerModules/farActionGrabEntity.js +5 −5
  3. scripts/system/controllers/controllerModules/farTrigger.js +4 −4
  4. scripts/system/controllers/controllerModules/hudOverlayPointer.js +4 −4
  5. scripts/system/controllers/controllerModules/inEditMode.js +4 −4
  6. scripts/system/controllers/controllerModules/nearParentGrabEntity.js +4 −4
  7. scripts/system/controllers/controllerModules/nearParentGrabOverlay.js +3 −3
  8. scripts/system/controllers/controllerModules/overlayLaserInput.js +5 −5
  9. scripts/system/controllers/controllerModules/tabletStylusInput.js +2 −2
  10. scripts/system/controllers/controllerModules/teleport.js +1 −1
  11. scripts/system/controllers/controllerModules/webEntityLaserInput.js +4 −4
scripts/system/controllers/controllerModules/equipEntity.js+2−2
@@ -6,7 +6,7 @@ · 5 unmodified lines
66 // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
77
88
9−/* global Script, Entities, MyAvatar, Controller, RIGHT_HAND, LEFT_HAND, AVATAR_SELF_ID,
9+/* global Script, Entities, MyAvatar, Controller, RIGHT_HAND, LEFT_HAND,
1010 getControllerJointIndex, enableDispatcherModule, disableDispatcherModule,
1111 Messages, makeDispatcherModuleParameters, makeRunningValues, Settings, entityHasActions,
1212 Vec3, Overlays, flatten, Xform, getControllerWorldLocation, ensureDynamic, entityIsCloneable,
@@ -491,7 +491,7 @@ EquipHotspotBuddy.prototype.update = function(deltaTime, timestamp, controllerDa · 478 unmodified lines
491491 }
492492
493493 var reparentProps = {
494− parentID: AVATAR_SELF_ID,
494+ parentID: MyAvatar.SELF_ID,
495495 parentJointIndex: handJointIndex,
496496 localVelocity: {x: 0, y: 0, z: 0},
497497 localAngularVelocity: {x: 0, y: 0, z: 0},
scripts/system/controllers/controllerModules/farActionGrabEntity.js+5−5
@@ -9,10 +9,10 @@ · 8 unmodified lines
99
1010 /* global Script, Controller, LaserPointers, RayPick, RIGHT_HAND, LEFT_HAND, Mat4, MyAvatar, Vec3, Camera, Quat,
1111 getGrabPointSphereOffset, getEnabledModuleByName, makeRunningValues, Entities,
12− enableDispatcherModule, disableDispatcherModule, entityIsDistanceGrabbable,
12+ enableDispatcherModule, disableDispatcherModule, entityIsDistanceGrabbable, entityIsGrabbable,
1313 makeDispatcherModuleParameters, MSECS_PER_SEC, HAPTIC_PULSE_STRENGTH, HAPTIC_PULSE_DURATION,
1414 PICK_MAX_DISTANCE, COLORS_GRAB_SEARCHING_HALF_SQUEEZE, COLORS_GRAB_SEARCHING_FULL_SQUEEZE, COLORS_GRAB_DISTANCE_HOLD,
15− AVATAR_SELF_ID, DEFAULT_SEARCH_SPHERE_DISTANCE, TRIGGER_OFF_VALUE, TRIGGER_ON_VALUE, ZERO_VEC, ensureDynamic,
15+ DEFAULT_SEARCH_SPHERE_DISTANCE, TRIGGER_OFF_VALUE, TRIGGER_ON_VALUE, ZERO_VEC, ensureDynamic,
1616 getControllerWorldLocation, projectOntoEntityXYPlane, ContextOverlay, HMD, Reticle, Overlays, isPointingAtUI
1717
1818 */
@@ -33,7 +33,7 @@ Script.include("/~/system/libraries/controllers.js"); · 14 unmodified lines
3333 lineWidth: 5,
3434 ignoreRayIntersection: true, // always ignore this
3535 drawInFront: true, // Even when burried inside of something, show it.
36− parentID: AVATAR_SELF_ID
36+ parentID: MyAvatar.SELF_ID
3737 };
3838 var halfEnd = {
3939 type: "sphere",
@@ -54,7 +54,7 @@ Script.include("/~/system/libraries/controllers.js"); · 14 unmodified lines
5454 lineWidth: 5,
5555 ignoreRayIntersection: true, // always ignore this
5656 drawInFront: true, // Even when burried inside of something, show it.
57− parentID: AVATAR_SELF_ID
57+ parentID: MyAvatar.SELF_ID
5858 };
5959 var fullEnd = {
6060 type: "sphere",
@@ -75,7 +75,7 @@ Script.include("/~/system/libraries/controllers.js"); · 14 unmodified lines
7575 lineWidth: 5,
7676 ignoreRayIntersection: true, // always ignore this
7777 drawInFront: true, // Even when burried inside of something, show it.
78− parentID: AVATAR_SELF_ID
78+ parentID: MyAvatar.SELF_ID
7979 };
8080
8181 var renderStates = [
scripts/system/controllers/controllerModules/farTrigger.js+4−4
@@ -9,7 +9,7 @@ · 8 unmodified lines
99 /* global Script, Controller, LaserPointers, RayPick, RIGHT_HAND, LEFT_HAND, MyAvatar, getGrabPointSphereOffset,
1010 makeRunningValues, Entities, enableDispatcherModule, disableDispatcherModule, makeDispatcherModuleParameters,
1111 PICK_MAX_DISTANCE, COLORS_GRAB_SEARCHING_HALF_SQUEEZE, COLORS_GRAB_SEARCHING_FULL_SQUEEZE, COLORS_GRAB_DISTANCE_HOLD,
12− AVATAR_SELF_ID, DEFAULT_SEARCH_SPHERE_DISTANCE, getGrabbableData
12+ DEFAULT_SEARCH_SPHERE_DISTANCE, getGrabbableData
1313 */
1414
1515 Script.include("/~/system/libraries/controllerDispatcherUtils.js");
@@ -26,7 +26,7 @@ Script.include("/~/system/libraries/controllers.js"); · 10 unmodified lines
2626 lineWidth: 5,
2727 ignoreRayIntersection: true, // always ignore this
2828 drawInFront: true, // Even when burried inside of something, show it.
29− parentID: AVATAR_SELF_ID
29+ parentID: MyAvatar.SELF_ID
3030 };
3131 var halfEnd = {
3232 type: "sphere",
@@ -47,7 +47,7 @@ Script.include("/~/system/libraries/controllers.js"); · 14 unmodified lines
4747 lineWidth: 5,
4848 ignoreRayIntersection: true, // always ignore this
4949 drawInFront: true, // Even when burried inside of something, show it.
50− parentID: AVATAR_SELF_ID
50+ parentID: MyAvatar.SELF_ID
5151 };
5252 var fullEnd = {
5353 type: "sphere",
@@ -68,7 +68,7 @@ Script.include("/~/system/libraries/controllers.js"); · 14 unmodified lines
6868 lineWidth: 5,
6969 ignoreRayIntersection: true, // always ignore this
7070 drawInFront: true, // Even when burried inside of something, show it.
71− parentID: AVATAR_SELF_ID
71+ parentID: MyAvatar.SELF_ID
7272 };
7373
7474 var renderStates = [
scripts/system/controllers/controllerModules/hudOverlayPointer.js+4−4
@@ -15,7 +15,7 @@ · 14 unmodified lines
1515 enableDispatcherModule, disableDispatcherModule, entityIsDistanceGrabbable,
1616 makeDispatcherModuleParameters, MSECS_PER_SEC, HAPTIC_PULSE_STRENGTH, HAPTIC_PULSE_DURATION,
1717 PICK_MAX_DISTANCE, COLORS_GRAB_SEARCHING_HALF_SQUEEZE, COLORS_GRAB_SEARCHING_FULL_SQUEEZE, COLORS_GRAB_DISTANCE_HOLD,
18− AVATAR_SELF_ID, DEFAULT_SEARCH_SPHERE_DISTANCE, TRIGGER_OFF_VALUE, TRIGGER_ON_VALUE, ZERO_VEC, ensureDynamic,
18+ DEFAULT_SEARCH_SPHERE_DISTANCE, TRIGGER_OFF_VALUE, TRIGGER_ON_VALUE, ZERO_VEC, ensureDynamic,
1919 getControllerWorldLocation, projectOntoEntityXYPlane, ContextOverlay, HMD, Reticle, Overlays, isPointingAtUI
2020
2121 */
@@ -32,7 +32,7 @@ · 10 unmodified lines
3232 lineWidth: 5,
3333 ignoreRayIntersection: true, // always ignore this
3434 drawHUDLayer: true,
35− parentID: AVATAR_SELF_ID
35+ parentID: MyAvatar.SELF_ID
3636 };
3737 var halfEnd = {
3838 type: "sphere",
@@ -53,7 +53,7 @@ · 14 unmodified lines
5353 lineWidth: 5,
5454 ignoreRayIntersection: true, // always ignore this
5555 drawHUDLayer: true,
56− parentID: AVATAR_SELF_ID
56+ parentID: MyAvatar.SELF_ID
5757 };
5858 var fullEnd = {
5959 type: "sphere",
@@ -74,7 +74,7 @@ · 14 unmodified lines
7474 lineWidth: 5,
7575 ignoreRayIntersection: true, // always ignore this
7676 drawHUDLayer: true,
77− parentID: AVATAR_SELF_ID
77+ parentID: MyAvatar.SELF_ID
7878 };
7979
8080 var renderStates = [
scripts/system/controllers/controllerModules/inEditMode.js+4−4
@@ -8,7 +8,7 @@ · 7 unmodified lines
88 /* jslint bitwise: true */
99
1010 /* global Script, Controller, RIGHT_HAND, LEFT_HAND, enableDispatcherModule, disableDispatcherModule, makeRunningValues,
11− Messages, makeDispatcherModuleParameters, AVATAR_SELF_ID, HMD, getGrabPointSphereOffset, COLORS_GRAB_SEARCHING_HALF_SQUEEZE,
11+ Messages, makeDispatcherModuleParameters, HMD, getGrabPointSphereOffset, COLORS_GRAB_SEARCHING_HALF_SQUEEZE,
1212 COLORS_GRAB_SEARCHING_FULL_SQUEEZE, COLORS_GRAB_DISTANCE_HOLD, DEFAULT_SEARCH_SPHERE_DISTANCE, TRIGGER_ON_VALUE,
1313 getEnabledModuleByName, PICK_MAX_DISTANCE, isInEditMode, LaserPointers, RayPick
1414 */
@@ -28,7 +28,7 @@ Script.include("/~/system/libraries/utils.js"); · 13 unmodified lines
2828 lineWidth: 5,
2929 ignoreRayIntersection: true, // always ignore this
3030 drawInFront: true, // Even when burried inside of something, show it.
31− parentID: AVATAR_SELF_ID
31+ parentID: MyAvatar.SELF_ID
3232 };
3333 var halfEnd = {
3434 type: "sphere",
@@ -49,7 +49,7 @@ Script.include("/~/system/libraries/utils.js"); · 14 unmodified lines
4949 lineWidth: 5,
5050 ignoreRayIntersection: true, // always ignore this
5151 drawInFront: true, // Even when burried inside of something, show it.
52− parentID: AVATAR_SELF_ID
52+ parentID: MyAvatar.SELF_ID
5353 };
5454 var fullEnd = {
5555 type: "sphere",
@@ -70,7 +70,7 @@ Script.include("/~/system/libraries/utils.js"); · 14 unmodified lines
7070 lineWidth: 5,
7171 ignoreRayIntersection: true, // always ignore this
7272 drawInFront: true, // Even when burried inside of something, show it.
73− parentID: AVATAR_SELF_ID
73+ parentID: MyAvatar.SELF_ID
7474 };
7575
7676 var renderStates = [
scripts/system/controllers/controllerModules/nearParentGrabEntity.js+4−4
@@ -6,7 +6,7 @@ · 5 unmodified lines
66 // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
77
88
9−/* global Script, Entities, MyAvatar, Controller, RIGHT_HAND, LEFT_HAND, AVATAR_SELF_ID, getControllerJointIndex,
9+/* global Script, Entities, MyAvatar, Controller, RIGHT_HAND, LEFT_HAND, getControllerJointIndex,
1010 enableDispatcherModule, disableDispatcherModule, propsArePhysical, Messages, HAPTIC_PULSE_STRENGTH, HAPTIC_PULSE_DURATION,
1111 TRIGGER_OFF_VALUE, makeDispatcherModuleParameters, entityIsGrabbable, makeRunningValues, NEAR_GRAB_RADIUS,
1212 findGroupParent, Vec3, cloneEntity, entityIsCloneable, propsAreCloneDynamic, HAPTIC_PULSE_STRENGTH,
@@ -50,7 +50,7 @@ Script.include("/~/system/libraries/cloneEntityUtils.js"); · 37 unmodified lines
5050 return false;
5151 }
5252
53− if (props.parentID !== MyAvatar.sessionUUID && props.parentID !== AVATAR_SELF_ID) {
53+ if (props.parentID !== MyAvatar.sessionUUID && props.parentID !== MyAvatar.SELF_ID) {
5454 return false;
5555 }
5656
@@ -90,7 +90,7 @@ Script.include("/~/system/libraries/cloneEntityUtils.js"); · 33 unmodified lines
9090 Entities.callEntityMethod(targetProps.id, "startNearGrab", args);
9191
9292 var reparentProps = {
93− parentID: AVATAR_SELF_ID,
93+ parentID: MyAvatar.SELF_ID,
9494 parentJointIndex: handJointIndex,
9595 localVelocity: {x: 0, y: 0, z: 0},
9696 localAngularVelocity: {x: 0, y: 0, z: 0}
@@ -152,7 +152,7 @@ Script.include("/~/system/libraries/cloneEntityUtils.js"); · 55 unmodified lines
152152 var now = Date.now();
153153 if (now - this.lastUnequipCheckTime > MSECS_PER_SEC * TEAR_AWAY_CHECK_TIME) {
154154 this.lastUnequipCheckTime = now;
155− if (props.parentID == AVATAR_SELF_ID) {
155+ if (props.parentID === MyAvatar.SELF_ID) {
156156 var sensorScaleFactor = MyAvatar.sensorToWorldScale;
157157 var handPosition = controllerData.controllerLocations[this.hand].position;
158158 var dist = distanceBetweenPointAndEntityBoundingBox(handPosition, props);
scripts/system/controllers/controllerModules/nearParentGrabOverlay.js+3−3
@@ -6,7 +6,7 @@ · 5 unmodified lines
66 // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
77
88
9−/* global Script, MyAvatar, Controller, RIGHT_HAND, LEFT_HAND, AVATAR_SELF_ID, getControllerJointIndex,
9+/* global Script, MyAvatar, Controller, RIGHT_HAND, LEFT_HAND, getControllerJointIndex,
1010 enableDispatcherModule, disableDispatcherModule, Messages, HAPTIC_PULSE_STRENGTH, HAPTIC_PULSE_DURATION,
1111 makeDispatcherModuleParameters, Overlays, makeRunningValues, Vec3, resizeTablet, getTabletWidthFromSettings,
1212 NEAR_GRAB_RADIUS
@@ -48,7 +48,7 @@ Script.include("/~/system/libraries/utils.js"); · 35 unmodified lines
4848 };
4949
5050 this.thisHandIsParent = function(props) {
51− if (props.parentID !== MyAvatar.sessionUUID && props.parentID !== AVATAR_SELF_ID) {
51+ if (props.parentID !== MyAvatar.sessionUUID && props.parentID !== MyAvatar.SELF_ID) {
5252 return false;
5353 }
5454
@@ -94,7 +94,7 @@ Script.include("/~/system/libraries/utils.js"); · 39 unmodified lines
9494 var grabbedProperties = this.getGrabbedProperties();
9595
9696 var reparentProps = {
97− parentID: AVATAR_SELF_ID,
97+ parentID: MyAvatar.SELF_ID,
9898 parentJointIndex: handJointIndex,
9999 velocity: {x: 0, y: 0, z: 0},
100100 angularVelocity: {x: 0, y: 0, z: 0}
scripts/system/controllers/controllerModules/overlayLaserInput.js+5−5
@@ -6,7 +6,7 @@ · 5 unmodified lines
66 // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
77
88 /* global Script, Entities, Controller, RIGHT_HAND, LEFT_HAND, enableDispatcherModule, disableDispatcherModule,
9− makeRunningValues, Messages, Quat, Vec3, makeDispatcherModuleParameters, Overlays, ZERO_VEC, AVATAR_SELF_ID, HMD,
9+ makeRunningValues, Messages, Quat, Vec3, makeDispatcherModuleParameters, Overlays, ZERO_VEC, HMD,
1010 INCHES_TO_METERS, DEFAULT_REGISTRATION_POINT, getGrabPointSphereOffset, COLORS_GRAB_SEARCHING_HALF_SQUEEZE,
1111 COLORS_GRAB_SEARCHING_FULL_SQUEEZE, COLORS_GRAB_DISTANCE_HOLD, DEFAULT_SEARCH_SPHERE_DISTANCE, TRIGGER_ON_VALUE,
1212 TRIGGER_OFF_VALUE, getEnabledModuleByName, PICK_MAX_DISTANCE, LaserPointers, RayPick, ContextOverlay
@@ -27,7 +27,7 @@ Script.include("/~/system/libraries/controllers.js"); · 14 unmodified lines
2727 lineWidth: 5,
2828 ignoreRayIntersection: true, // always ignore this
2929 drawInFront: true, // Even when burried inside of something, show it.
30− parentID: AVATAR_SELF_ID
30+ parentID: MyAvatar.SELF_ID
3131 };
3232 var halfEnd = {
3333 type: "sphere",
@@ -48,7 +48,7 @@ Script.include("/~/system/libraries/controllers.js"); · 14 unmodified lines
4848 lineWidth: 5,
4949 ignoreRayIntersection: true, // always ignore this
5050 drawInFront: true, // Even when burried inside of something, show it.
51− parentID: AVATAR_SELF_ID
51+ parentID: MyAvatar.SELF_ID
5252 };
5353 var fullEnd = {
5454 type: "sphere",
@@ -69,7 +69,7 @@ Script.include("/~/system/libraries/controllers.js"); · 14 unmodified lines
6969 lineWidth: 5,
7070 ignoreRayIntersection: true, // always ignore this
7171 drawInFront: true, // Even when burried inside of something, show it.
72− parentID: AVATAR_SELF_ID
72+ parentID: MyAvatar.SELF_ID
7373 };
7474
7575 var renderStates = [
@@ -235,7 +235,7 @@ Script.include("/~/system/libraries/controllers.js"); · 159 unmodified lines
235235 var POINTER_PRESS_TO_MOVE_DELAY = 0.33; // seconds
236236 if (this.deadspotExpired || this.touchingEnterTimer > POINTER_PRESS_TO_MOVE_DELAY ||
237237 distance2D(this.laserTarget.position2D,
238− this.pressEnterLaserTarget.position2D) > this.deadspotRadius) {
238+ this.pressEnterLaserTarget.position2D) > this.deadspotRadius) {
239239 TouchEventUtils.sendTouchMoveEventToTouchTarget(this.hand, this.laserTarget);
240240 this.deadspotExpired = true;
241241 }
scripts/system/controllers/controllerModules/tabletStylusInput.js+2−2
@@ -8,7 +8,7 @@ · 7 unmodified lines
88 /* global Script, Entities, MyAvatar, Controller, RIGHT_HAND, LEFT_HAND,
99 enableDispatcherModule, disableDispatcherModule, makeRunningValues,
1010 Messages, Quat, Vec3, getControllerWorldLocation, makeDispatcherModuleParameters, Overlays, ZERO_VEC,
11− AVATAR_SELF_ID, HMD, INCHES_TO_METERS, DEFAULT_REGISTRATION_POINT, Settings, getGrabPointSphereOffset,
11+ HMD, INCHES_TO_METERS, DEFAULT_REGISTRATION_POINT, Settings, getGrabPointSphereOffset,
1212 getEnabledModuleByName
1313 */
1414
@@ -172,7 +172,7 @@ Script.include("/~/system/libraries/controllers.js"); · 157 unmodified lines
172172 visible: true,
173173 ignoreRayIntersection: true,
174174 drawInFront: false,
175− parentID: AVATAR_SELF_ID,
175+ parentID: MyAvatar.SELF_ID,
176176 parentJointIndex: MyAvatar.getJointIndex(this.hand === RIGHT_HAND ?
177177 "_CAMERA_RELATIVE_CONTROLLER_RIGHTHAND" :
178178 "_CAMERA_RELATIVE_CONTROLLER_LEFTHAND")
scripts/system/controllers/controllerModules/teleport.js+1−1
@@ -10,7 +10,7 @@ · 9 unmodified lines
1010
1111 /* jslint bitwise: true */
1212
13−/* global Script, Entities, MyAvatar, Controller, RIGHT_HAND, LEFT_HAND, AVATAR_SELF_ID, getControllerJointIndex,
13+/* global Script, Entities, MyAvatar, Controller, RIGHT_HAND, LEFT_HAND, getControllerJointIndex,
1414 enableDispatcherModule, disableDispatcherModule, Messages, makeDispatcherModuleParameters, makeRunningValues, Vec3,
1515 LaserPointers, RayPick, HMD, Uuid, AvatarList
1616 */
scripts/system/controllers/controllerModules/webEntityLaserInput.js+4−4
@@ -10,7 +10,7 @@ · 9 unmodified lines
1010 /* global Script, Controller, LaserPointers, RayPick, RIGHT_HAND, LEFT_HAND, Vec3, Quat, getGrabPointSphereOffset,
1111 makeRunningValues, Entities, enableDispatcherModule, disableDispatcherModule, makeDispatcherModuleParameters,
1212 PICK_MAX_DISTANCE, COLORS_GRAB_SEARCHING_HALF_SQUEEZE, COLORS_GRAB_SEARCHING_FULL_SQUEEZE, COLORS_GRAB_DISTANCE_HOLD,
13− AVATAR_SELF_ID, DEFAULT_SEARCH_SPHERE_DISTANCE, TRIGGER_ON_VALUE, ZERO_VEC, Overlays
13+ DEFAULT_SEARCH_SPHERE_DISTANCE, TRIGGER_ON_VALUE, ZERO_VEC, Overlays
1414 */
1515
1616 Script.include("/~/system/libraries/controllerDispatcherUtils.js");
@@ -27,7 +27,7 @@ Script.include("/~/system/libraries/controllers.js"); · 10 unmodified lines
2727 lineWidth: 5,
2828 ignoreRayIntersection: true, // always ignore this
2929 drawInFront: true, // Even when burried inside of something, show it.
30− parentID: AVATAR_SELF_ID
30+ parentID: MyAvatar.SELF_ID
3131 };
3232 var halfEnd = {
3333 type: "sphere",
@@ -48,7 +48,7 @@ Script.include("/~/system/libraries/controllers.js"); · 14 unmodified lines
4848 lineWidth: 5,
4949 ignoreRayIntersection: true, // always ignore this
5050 drawInFront: true, // Even when burried inside of something, show it.
51− parentID: AVATAR_SELF_ID
51+ parentID: MyAvatar.SELF_ID
5252 };
5353 var fullEnd = {
5454 type: "sphere",
@@ -69,7 +69,7 @@ Script.include("/~/system/libraries/controllers.js"); · 14 unmodified lines
6969 lineWidth: 5,
7070 ignoreRayIntersection: true, // always ignore this
7171 drawInFront: true, // Even when burried inside of something, show it.
72− parentID: AVATAR_SELF_ID
72+ parentID: MyAvatar.SELF_ID
7373 };
7474
7575 var renderStates = [

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