Replace usages of AVATAR_SELF_ID previously missed

This commit is contained in:
David Rowe 2017-10-17 16:38:05 +13:00
parent ed1c974f75
commit 8d4e979dc8
13 changed files with 39 additions and 41 deletions

View file

@ -1,5 +1,3 @@
var AVATAR_SELF_ID = "{00000000-0000-0000-0000-000000000001}";
var debugSphereBaseProperties = {
type: "Sphere",
dimensions: { x: 0.2, y: 0.2, z: 0.2 },

View file

@ -6,7 +6,7 @@
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
/* global Script, Entities, MyAvatar, Controller, RIGHT_HAND, LEFT_HAND, AVATAR_SELF_ID,
/* global Script, Entities, MyAvatar, Controller, RIGHT_HAND, LEFT_HAND,
getControllerJointIndex, enableDispatcherModule, disableDispatcherModule,
Messages, makeDispatcherModuleParameters, makeRunningValues, Settings, entityHasActions,
Vec3, Overlays, flatten, Xform, getControllerWorldLocation, ensureDynamic, entityIsCloneable,
@ -491,7 +491,7 @@ EquipHotspotBuddy.prototype.update = function(deltaTime, timestamp, controllerDa
}
var reparentProps = {
parentID: AVATAR_SELF_ID,
parentID: MyAvatar.SELF_ID,
parentJointIndex: handJointIndex,
localVelocity: {x: 0, y: 0, z: 0},
localAngularVelocity: {x: 0, y: 0, z: 0},

View file

@ -9,10 +9,10 @@
/* global Script, Controller, LaserPointers, RayPick, RIGHT_HAND, LEFT_HAND, Mat4, MyAvatar, Vec3, Camera, Quat,
getGrabPointSphereOffset, getEnabledModuleByName, makeRunningValues, Entities,
enableDispatcherModule, disableDispatcherModule, entityIsDistanceGrabbable,
enableDispatcherModule, disableDispatcherModule, entityIsDistanceGrabbable, entityIsGrabbable,
makeDispatcherModuleParameters, MSECS_PER_SEC, HAPTIC_PULSE_STRENGTH, HAPTIC_PULSE_DURATION,
PICK_MAX_DISTANCE, COLORS_GRAB_SEARCHING_HALF_SQUEEZE, COLORS_GRAB_SEARCHING_FULL_SQUEEZE, COLORS_GRAB_DISTANCE_HOLD,
AVATAR_SELF_ID, DEFAULT_SEARCH_SPHERE_DISTANCE, TRIGGER_OFF_VALUE, TRIGGER_ON_VALUE, ZERO_VEC, ensureDynamic,
DEFAULT_SEARCH_SPHERE_DISTANCE, TRIGGER_OFF_VALUE, TRIGGER_ON_VALUE, ZERO_VEC, ensureDynamic,
getControllerWorldLocation, projectOntoEntityXYPlane, ContextOverlay, HMD, Reticle, Overlays, isPointingAtUI
*/
@ -33,7 +33,7 @@ Script.include("/~/system/libraries/controllers.js");
lineWidth: 5,
ignoreRayIntersection: true, // always ignore this
drawInFront: true, // Even when burried inside of something, show it.
parentID: AVATAR_SELF_ID
parentID: MyAvatar.SELF_ID
};
var halfEnd = {
type: "sphere",
@ -54,7 +54,7 @@ Script.include("/~/system/libraries/controllers.js");
lineWidth: 5,
ignoreRayIntersection: true, // always ignore this
drawInFront: true, // Even when burried inside of something, show it.
parentID: AVATAR_SELF_ID
parentID: MyAvatar.SELF_ID
};
var fullEnd = {
type: "sphere",
@ -75,7 +75,7 @@ Script.include("/~/system/libraries/controllers.js");
lineWidth: 5,
ignoreRayIntersection: true, // always ignore this
drawInFront: true, // Even when burried inside of something, show it.
parentID: AVATAR_SELF_ID
parentID: MyAvatar.SELF_ID
};
var renderStates = [

View file

@ -9,7 +9,7 @@
/* global Script, Controller, LaserPointers, RayPick, RIGHT_HAND, LEFT_HAND, MyAvatar, getGrabPointSphereOffset,
makeRunningValues, Entities, enableDispatcherModule, disableDispatcherModule, makeDispatcherModuleParameters,
PICK_MAX_DISTANCE, COLORS_GRAB_SEARCHING_HALF_SQUEEZE, COLORS_GRAB_SEARCHING_FULL_SQUEEZE, COLORS_GRAB_DISTANCE_HOLD,
AVATAR_SELF_ID, DEFAULT_SEARCH_SPHERE_DISTANCE, getGrabbableData
DEFAULT_SEARCH_SPHERE_DISTANCE, getGrabbableData
*/
Script.include("/~/system/libraries/controllerDispatcherUtils.js");
@ -26,7 +26,7 @@ Script.include("/~/system/libraries/controllers.js");
lineWidth: 5,
ignoreRayIntersection: true, // always ignore this
drawInFront: true, // Even when burried inside of something, show it.
parentID: AVATAR_SELF_ID
parentID: MyAvatar.SELF_ID
};
var halfEnd = {
type: "sphere",
@ -47,7 +47,7 @@ Script.include("/~/system/libraries/controllers.js");
lineWidth: 5,
ignoreRayIntersection: true, // always ignore this
drawInFront: true, // Even when burried inside of something, show it.
parentID: AVATAR_SELF_ID
parentID: MyAvatar.SELF_ID
};
var fullEnd = {
type: "sphere",
@ -68,7 +68,7 @@ Script.include("/~/system/libraries/controllers.js");
lineWidth: 5,
ignoreRayIntersection: true, // always ignore this
drawInFront: true, // Even when burried inside of something, show it.
parentID: AVATAR_SELF_ID
parentID: MyAvatar.SELF_ID
};
var renderStates = [

View file

@ -15,7 +15,7 @@
enableDispatcherModule, disableDispatcherModule, entityIsDistanceGrabbable,
makeDispatcherModuleParameters, MSECS_PER_SEC, HAPTIC_PULSE_STRENGTH, HAPTIC_PULSE_DURATION,
PICK_MAX_DISTANCE, COLORS_GRAB_SEARCHING_HALF_SQUEEZE, COLORS_GRAB_SEARCHING_FULL_SQUEEZE, COLORS_GRAB_DISTANCE_HOLD,
AVATAR_SELF_ID, DEFAULT_SEARCH_SPHERE_DISTANCE, TRIGGER_OFF_VALUE, TRIGGER_ON_VALUE, ZERO_VEC, ensureDynamic,
DEFAULT_SEARCH_SPHERE_DISTANCE, TRIGGER_OFF_VALUE, TRIGGER_ON_VALUE, ZERO_VEC, ensureDynamic,
getControllerWorldLocation, projectOntoEntityXYPlane, ContextOverlay, HMD, Reticle, Overlays, isPointingAtUI
*/
@ -32,7 +32,7 @@
lineWidth: 5,
ignoreRayIntersection: true, // always ignore this
drawHUDLayer: true,
parentID: AVATAR_SELF_ID
parentID: MyAvatar.SELF_ID
};
var halfEnd = {
type: "sphere",
@ -53,7 +53,7 @@
lineWidth: 5,
ignoreRayIntersection: true, // always ignore this
drawHUDLayer: true,
parentID: AVATAR_SELF_ID
parentID: MyAvatar.SELF_ID
};
var fullEnd = {
type: "sphere",
@ -74,7 +74,7 @@
lineWidth: 5,
ignoreRayIntersection: true, // always ignore this
drawHUDLayer: true,
parentID: AVATAR_SELF_ID
parentID: MyAvatar.SELF_ID
};
var renderStates = [

View file

@ -8,7 +8,7 @@
/* jslint bitwise: true */
/* global Script, Controller, RIGHT_HAND, LEFT_HAND, enableDispatcherModule, disableDispatcherModule, makeRunningValues,
Messages, makeDispatcherModuleParameters, AVATAR_SELF_ID, HMD, getGrabPointSphereOffset, COLORS_GRAB_SEARCHING_HALF_SQUEEZE,
Messages, makeDispatcherModuleParameters, HMD, getGrabPointSphereOffset, COLORS_GRAB_SEARCHING_HALF_SQUEEZE,
COLORS_GRAB_SEARCHING_FULL_SQUEEZE, COLORS_GRAB_DISTANCE_HOLD, DEFAULT_SEARCH_SPHERE_DISTANCE, TRIGGER_ON_VALUE,
getEnabledModuleByName, PICK_MAX_DISTANCE, isInEditMode, LaserPointers, RayPick
*/
@ -28,7 +28,7 @@ Script.include("/~/system/libraries/utils.js");
lineWidth: 5,
ignoreRayIntersection: true, // always ignore this
drawInFront: true, // Even when burried inside of something, show it.
parentID: AVATAR_SELF_ID
parentID: MyAvatar.SELF_ID
};
var halfEnd = {
type: "sphere",
@ -49,7 +49,7 @@ Script.include("/~/system/libraries/utils.js");
lineWidth: 5,
ignoreRayIntersection: true, // always ignore this
drawInFront: true, // Even when burried inside of something, show it.
parentID: AVATAR_SELF_ID
parentID: MyAvatar.SELF_ID
};
var fullEnd = {
type: "sphere",
@ -70,7 +70,7 @@ Script.include("/~/system/libraries/utils.js");
lineWidth: 5,
ignoreRayIntersection: true, // always ignore this
drawInFront: true, // Even when burried inside of something, show it.
parentID: AVATAR_SELF_ID
parentID: MyAvatar.SELF_ID
};
var renderStates = [

View file

@ -6,7 +6,7 @@
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
/* global Script, Entities, MyAvatar, Controller, RIGHT_HAND, LEFT_HAND, AVATAR_SELF_ID, getControllerJointIndex,
/* global Script, Entities, MyAvatar, Controller, RIGHT_HAND, LEFT_HAND, getControllerJointIndex,
enableDispatcherModule, disableDispatcherModule, propsArePhysical, Messages, HAPTIC_PULSE_STRENGTH, HAPTIC_PULSE_DURATION,
TRIGGER_OFF_VALUE, makeDispatcherModuleParameters, entityIsGrabbable, makeRunningValues, NEAR_GRAB_RADIUS,
findGroupParent, Vec3, cloneEntity, entityIsCloneable, propsAreCloneDynamic, HAPTIC_PULSE_STRENGTH,
@ -50,7 +50,7 @@ Script.include("/~/system/libraries/cloneEntityUtils.js");
return false;
}
if (props.parentID !== MyAvatar.sessionUUID && props.parentID !== AVATAR_SELF_ID) {
if (props.parentID !== MyAvatar.sessionUUID && props.parentID !== MyAvatar.SELF_ID) {
return false;
}
@ -90,7 +90,7 @@ Script.include("/~/system/libraries/cloneEntityUtils.js");
Entities.callEntityMethod(targetProps.id, "startNearGrab", args);
var reparentProps = {
parentID: AVATAR_SELF_ID,
parentID: MyAvatar.SELF_ID,
parentJointIndex: handJointIndex,
localVelocity: {x: 0, y: 0, z: 0},
localAngularVelocity: {x: 0, y: 0, z: 0}
@ -152,7 +152,7 @@ Script.include("/~/system/libraries/cloneEntityUtils.js");
var now = Date.now();
if (now - this.lastUnequipCheckTime > MSECS_PER_SEC * TEAR_AWAY_CHECK_TIME) {
this.lastUnequipCheckTime = now;
if (props.parentID == AVATAR_SELF_ID) {
if (props.parentID === MyAvatar.SELF_ID) {
var sensorScaleFactor = MyAvatar.sensorToWorldScale;
var handPosition = controllerData.controllerLocations[this.hand].position;
var dist = distanceBetweenPointAndEntityBoundingBox(handPosition, props);

View file

@ -6,7 +6,7 @@
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
/* global Script, MyAvatar, Controller, RIGHT_HAND, LEFT_HAND, AVATAR_SELF_ID, getControllerJointIndex,
/* global Script, MyAvatar, Controller, RIGHT_HAND, LEFT_HAND, getControllerJointIndex,
enableDispatcherModule, disableDispatcherModule, Messages, HAPTIC_PULSE_STRENGTH, HAPTIC_PULSE_DURATION,
makeDispatcherModuleParameters, Overlays, makeRunningValues, Vec3, resizeTablet, getTabletWidthFromSettings,
NEAR_GRAB_RADIUS
@ -48,7 +48,7 @@ Script.include("/~/system/libraries/utils.js");
};
this.thisHandIsParent = function(props) {
if (props.parentID !== MyAvatar.sessionUUID && props.parentID !== AVATAR_SELF_ID) {
if (props.parentID !== MyAvatar.sessionUUID && props.parentID !== MyAvatar.SELF_ID) {
return false;
}
@ -94,7 +94,7 @@ Script.include("/~/system/libraries/utils.js");
var grabbedProperties = this.getGrabbedProperties();
var reparentProps = {
parentID: AVATAR_SELF_ID,
parentID: MyAvatar.SELF_ID,
parentJointIndex: handJointIndex,
velocity: {x: 0, y: 0, z: 0},
angularVelocity: {x: 0, y: 0, z: 0}

View file

@ -6,7 +6,7 @@
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
/* global Script, Entities, Controller, RIGHT_HAND, LEFT_HAND, enableDispatcherModule, disableDispatcherModule,
makeRunningValues, Messages, Quat, Vec3, makeDispatcherModuleParameters, Overlays, ZERO_VEC, AVATAR_SELF_ID, HMD,
makeRunningValues, Messages, Quat, Vec3, makeDispatcherModuleParameters, Overlays, ZERO_VEC, HMD,
INCHES_TO_METERS, DEFAULT_REGISTRATION_POINT, getGrabPointSphereOffset, COLORS_GRAB_SEARCHING_HALF_SQUEEZE,
COLORS_GRAB_SEARCHING_FULL_SQUEEZE, COLORS_GRAB_DISTANCE_HOLD, DEFAULT_SEARCH_SPHERE_DISTANCE, TRIGGER_ON_VALUE,
TRIGGER_OFF_VALUE, getEnabledModuleByName, PICK_MAX_DISTANCE, LaserPointers, RayPick, ContextOverlay
@ -27,7 +27,7 @@ Script.include("/~/system/libraries/controllers.js");
lineWidth: 5,
ignoreRayIntersection: true, // always ignore this
drawInFront: true, // Even when burried inside of something, show it.
parentID: AVATAR_SELF_ID
parentID: MyAvatar.SELF_ID
};
var halfEnd = {
type: "sphere",
@ -48,7 +48,7 @@ Script.include("/~/system/libraries/controllers.js");
lineWidth: 5,
ignoreRayIntersection: true, // always ignore this
drawInFront: true, // Even when burried inside of something, show it.
parentID: AVATAR_SELF_ID
parentID: MyAvatar.SELF_ID
};
var fullEnd = {
type: "sphere",
@ -69,7 +69,7 @@ Script.include("/~/system/libraries/controllers.js");
lineWidth: 5,
ignoreRayIntersection: true, // always ignore this
drawInFront: true, // Even when burried inside of something, show it.
parentID: AVATAR_SELF_ID
parentID: MyAvatar.SELF_ID
};
var renderStates = [
@ -235,7 +235,7 @@ Script.include("/~/system/libraries/controllers.js");
var POINTER_PRESS_TO_MOVE_DELAY = 0.33; // seconds
if (this.deadspotExpired || this.touchingEnterTimer > POINTER_PRESS_TO_MOVE_DELAY ||
distance2D(this.laserTarget.position2D,
this.pressEnterLaserTarget.position2D) > this.deadspotRadius) {
this.pressEnterLaserTarget.position2D) > this.deadspotRadius) {
TouchEventUtils.sendTouchMoveEventToTouchTarget(this.hand, this.laserTarget);
this.deadspotExpired = true;
}

View file

@ -8,7 +8,7 @@
/* global Script, Entities, MyAvatar, Controller, RIGHT_HAND, LEFT_HAND,
enableDispatcherModule, disableDispatcherModule, makeRunningValues,
Messages, Quat, Vec3, getControllerWorldLocation, makeDispatcherModuleParameters, Overlays, ZERO_VEC,
AVATAR_SELF_ID, HMD, INCHES_TO_METERS, DEFAULT_REGISTRATION_POINT, Settings, getGrabPointSphereOffset,
HMD, INCHES_TO_METERS, DEFAULT_REGISTRATION_POINT, Settings, getGrabPointSphereOffset,
getEnabledModuleByName
*/
@ -172,7 +172,7 @@ Script.include("/~/system/libraries/controllers.js");
visible: true,
ignoreRayIntersection: true,
drawInFront: false,
parentID: AVATAR_SELF_ID,
parentID: MyAvatar.SELF_ID,
parentJointIndex: MyAvatar.getJointIndex(this.hand === RIGHT_HAND ?
"_CAMERA_RELATIVE_CONTROLLER_RIGHTHAND" :
"_CAMERA_RELATIVE_CONTROLLER_LEFTHAND")

View file

@ -10,7 +10,7 @@
/* jslint bitwise: true */
/* global Script, Entities, MyAvatar, Controller, RIGHT_HAND, LEFT_HAND, AVATAR_SELF_ID, getControllerJointIndex,
/* global Script, Entities, MyAvatar, Controller, RIGHT_HAND, LEFT_HAND, getControllerJointIndex,
enableDispatcherModule, disableDispatcherModule, Messages, makeDispatcherModuleParameters, makeRunningValues, Vec3,
LaserPointers, RayPick, HMD, Uuid, AvatarList
*/

View file

@ -10,7 +10,7 @@
/* global Script, Controller, LaserPointers, RayPick, RIGHT_HAND, LEFT_HAND, Vec3, Quat, getGrabPointSphereOffset,
makeRunningValues, Entities, enableDispatcherModule, disableDispatcherModule, makeDispatcherModuleParameters,
PICK_MAX_DISTANCE, COLORS_GRAB_SEARCHING_HALF_SQUEEZE, COLORS_GRAB_SEARCHING_FULL_SQUEEZE, COLORS_GRAB_DISTANCE_HOLD,
AVATAR_SELF_ID, DEFAULT_SEARCH_SPHERE_DISTANCE, TRIGGER_ON_VALUE, ZERO_VEC, Overlays
DEFAULT_SEARCH_SPHERE_DISTANCE, TRIGGER_ON_VALUE, ZERO_VEC, Overlays
*/
Script.include("/~/system/libraries/controllerDispatcherUtils.js");
@ -27,7 +27,7 @@ Script.include("/~/system/libraries/controllers.js");
lineWidth: 5,
ignoreRayIntersection: true, // always ignore this
drawInFront: true, // Even when burried inside of something, show it.
parentID: AVATAR_SELF_ID
parentID: MyAvatar.SELF_ID
};
var halfEnd = {
type: "sphere",
@ -48,7 +48,7 @@ Script.include("/~/system/libraries/controllers.js");
lineWidth: 5,
ignoreRayIntersection: true, // always ignore this
drawInFront: true, // Even when burried inside of something, show it.
parentID: AVATAR_SELF_ID
parentID: MyAvatar.SELF_ID
};
var fullEnd = {
type: "sphere",
@ -69,7 +69,7 @@ Script.include("/~/system/libraries/controllers.js");
lineWidth: 5,
ignoreRayIntersection: true, // always ignore this
drawInFront: true, // Even when burried inside of something, show it.
parentID: AVATAR_SELF_ID
parentID: MyAvatar.SELF_ID
};
var renderStates = [

View file

@ -8,7 +8,7 @@
/* global Script, Entities, MyAvatar, Controller, RIGHT_HAND, LEFT_HAND,
enableDispatcherModule, disableDispatcherModule, makeRunningValues,
Messages, Quat, Vec3, getControllerWorldLocation, makeDispatcherModuleParameters, Overlays, controllerDispatcher.ZERO_VEC,
AVATAR_SELF_ID, HMD, INCHES_TO_METERS, DEFAULT_REGISTRATION_POINT, Settings, getGrabPointSphereOffset
HMD, INCHES_TO_METERS, DEFAULT_REGISTRATION_POINT, Settings, getGrabPointSphereOffset
*/
var controllerDispatcher = Script.require("/~/system/libraries/controllerDispatcherUtils.js");