This commit is contained in:
James B. Pollack 2016-03-24 14:33:58 -07:00
parent 5f3c176269
commit b4a4f276ea

View file

@ -73,7 +73,6 @@
var doppelgangers = []; var doppelgangers = [];
function Doppelganger(avatar) { function Doppelganger(avatar) {
this.initialProperties = { this.initialProperties = {
name: 'Hifi-Doppelganger', name: 'Hifi-Doppelganger',
@ -93,7 +92,7 @@
}) })
}; };
this.id = createDoppelgangerEntity(this); this.id = createDoppelgangerEntity(this.initialProperties);
this.avatar = avatar; this.avatar = avatar;
return this; return this;
} }
@ -250,7 +249,7 @@
RightHandPinky3: "RightHandPinky2", RightHandPinky3: "RightHandPinky2",
RightHandPinky4: "RightHandPinky3", RightHandPinky4: "RightHandPinky3",
LeftShoulder: "Spine3", LeftShoulder: "Spine3",
LeftArm: "LeftShoulder", LeftArm: "LeftShoulder",
LeftForeArm: "LeftArm", LeftForeArm: "LeftArm",
LeftHand: "LeftForeArm", LeftHand: "LeftForeArm",
LeftHandThumb1: "LeftHand", LeftHandThumb1: "LeftHand",
@ -399,8 +398,8 @@
return new Doppelganger(avatar); return new Doppelganger(avatar);
} }
function createDoppelgangerEntity(doppelganger) { function createDoppelgangerEntity(initialProperties) {
return Entities.addEntity(doppelganger.initialProperties); return Entities.addEntity(initialProperties);
} }
function matchBasePosition() { function matchBasePosition() {
@ -694,6 +693,7 @@
function cleanup() { function cleanup() {
if (isConnected === true) { if (isConnected === true) {
disconnectDoppelgangerUpdates(); disconnectDoppelgangerUpdates();
} }
@ -702,6 +702,8 @@
print('DOPPELGANGER' + doppelganger.id) print('DOPPELGANGER' + doppelganger.id)
Entities.deleteEntity(doppelganger.id); Entities.deleteEntity(doppelganger.id);
}); });
doppelgangers = [];
} }
return new DressingRoom(); return new DressingRoom();