Skip to content

Commit

Permalink
workaround the problem of reinstating custome list of behavior module…
Browse files Browse the repository at this point in the history
…s for the avatar
  • Loading branch information
yoshikiohshima committed May 17, 2024
1 parent 945f4c2 commit f5c0223
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/avatar.js
Original file line number Diff line number Diff line change
Expand Up @@ -553,7 +553,7 @@ export class AvatarActor extends mix(CardActor).with(AM_Player) {
}

setAvatarData(options) {
// console.log("setAvatarData", options);
console.log("setAvatarData", options);
this.setupAvatarBehavior(options);
this.updateOptions(options);
this.ensureNicknameCard();
Expand Down Expand Up @@ -899,10 +899,13 @@ export class AvatarPawn extends mix(CardPawn).with(PM_Player, PM_SmoothedDriver,
actorSpec = dormantAvatarSpec;
actorSpec.anchor = anchor;
actorSpec.inWorld = true;
dormantAvatarSpec = null;
avatarSpec = actorSpec.cardData;
avatarName = actorSpec.name;
if (dormantAvatarSpec?.behaviorModules) {
avatarSpec.behaviorModules = [...dormantAvatarSpec.behaviorModules];
}
avatarSpec.name = avatarName;
dormantAvatarSpec = null;
} else {
actorSpec = { inWorld };
const anchor = this.anchorFromURL(window.location, !this.isPrimary);
Expand Down

0 comments on commit f5c0223

Please sign in to comment.