|
@@ -97,9 +97,9 @@ export default class XverseAvatarManager extends EventEmitter {
|
|
const r = this._room.userId === t.userId;
|
|
const r = this._room.userId === t.userId;
|
|
if (((n = t.event) == null ? void 0 : n.type) === SyncEventType.ET_RemoveVisitor) {
|
|
if (((n = t.event) == null ? void 0 : n.type) === SyncEventType.ET_RemoveVisitor) {
|
|
const d = (a = (o = t.event) == null ? void 0 : o.removeVisitorEvent) == null ? void 0 : a.removeVisitorEvent
|
|
const d = (a = (o = t.event) == null ? void 0 : o.removeVisitorEvent) == null ? void 0 : a.removeVisitorEvent
|
|
- , _ = JSON.parse(safeDecodeURIComponent(((l = (s = t.event) == null ? void 0 : s.removeVisitorEvent) == null ? void 0 : l.extraInfo) || ""))
|
|
|
|
- , {code: g, msg: m} = _;
|
|
|
|
- d === RemoveVisitorType.RVT_ChangeToObserver ? this._room.audienceViewModeHook() : d === RemoveVisitorType.RVT_MoveOutOfTheRoom && this._room.leave(),
|
|
|
|
|
|
+ const _ = JSON.parse(safeDecodeURIComponent(((l = (s = t.event) == null ? void 0 : s.removeVisitorEvent) == null ? void 0 : l.extraInfo) || ""))
|
|
|
|
+ const {code: g, msg: m} = _;
|
|
|
|
+ d === RemoveVisitorType.RVT_ChangeToObserver ? this._room.audienceViewModeHook() : d === RemoveVisitorType.RVT_MoveOutOfTheRoom && this._room.leave();
|
|
this._room.emit("visitorStatusChanged", {
|
|
this._room.emit("visitorStatusChanged", {
|
|
code: g,
|
|
code: g,
|
|
msg: m
|
|
msg: m
|
|
@@ -121,15 +121,18 @@ export default class XverseAvatarManager extends EventEmitter {
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
const {position: _, angle: g} = t.playerState.player
|
|
const {position: _, angle: g} = t.playerState.player
|
|
- , m = t.playerState.avatarId
|
|
|
|
- , v = t.playerState.prioritySync
|
|
|
|
- , y = safelyJsonParse(t.playerState.extra);
|
|
|
|
- if (!m)
|
|
|
|
- return;
|
|
|
|
|
|
+ let m = t.playerState.avatarId
|
|
|
|
+ const v = t.playerState.prioritySync
|
|
|
|
+ const y = safelyJsonParse(t.playerState.extra);
|
|
const b = safeParseComponents(t.playerState.avatarComponents)
|
|
const b = safeParseComponents(t.playerState.avatarComponents)
|
|
- , T = safeDecodeURIComponent(t.playerState.nickName)
|
|
|
|
- , C = this.calculatePriority(t.userId, y);
|
|
|
|
|
|
+ let T = safeDecodeURIComponent(t.playerState.nickName)
|
|
|
|
+ let C = this.calculatePriority(t.userId, y);
|
|
|
|
|
|
|
|
+ if (!m)
|
|
|
|
+ {
|
|
|
|
+ m = "KGe_Boy"
|
|
|
|
+ }
|
|
|
|
+
|
|
this.addAvatar({
|
|
this.addAvatar({
|
|
userId: t.userId,
|
|
userId: t.userId,
|
|
isHost: t.playerState.isHost,
|
|
isHost: t.playerState.isHost,
|