Bug fixes

This commit is contained in:
Natsumi
2021-04-16 21:19:40 +12:00
parent 698618c773
commit d50227c887

View File

@@ -3922,13 +3922,16 @@ speechSynthesis.getVoices();
if ((playerCountIndex === 0) && (ctx.type === 'Location')) { if ((playerCountIndex === 0) && (ctx.type === 'Location')) {
playerCountIndex = i; playerCountIndex = i;
} }
if (((ctx.type === 'OnPlayerJoined') || (ctx.type === 'OnPlayerLeft')) && if (((ctx.type === 'OnPlayerJoined') ||
(ctx.type === 'OnPlayerLeft') ||
(ctx.type === 'PortalSpawn')) &&
(ctx.data === API.currentUser.displayName)) { (ctx.data === API.currentUser.displayName)) {
continue; continue;
} }
// on Location change remove OnPlayerJoined // on Location change remove OnPlayerJoined
if ((ctx.type === 'Location') && (this.hideOnPlayerJoined)) { if (ctx.type === 'Location') {
var locationBias = new Date(Date.parse(ctx.created_at) + 15000).toJSON(); //15 seconds var locationBias = new Date(Date.parse(ctx.created_at) + 15000).toJSON(); //15 seconds
if (this.hideOnPlayerJoined) {
for (var k = w - 1; k > -1; k--) { for (var k = w - 1; k > -1; k--) {
var feedItem = wristArr[k]; var feedItem = wristArr[k];
if ((feedItem.created_at > locationBias) || (feedItem.type === 'Location')) { if ((feedItem.created_at > locationBias) || (feedItem.type === 'Location')) {
@@ -3939,6 +3942,7 @@ speechSynthesis.getVoices();
w--; w--;
} }
} }
}
for (var k = n - 1; k > -1; k--) { for (var k = n - 1; k > -1; k--) {
var feedItem = notyArr[k]; var feedItem = notyArr[k];
if (feedItem.created_at > locationBias) { if (feedItem.created_at > locationBias) {
@@ -4294,9 +4298,9 @@ speechSynthesis.getVoices();
continue; continue;
} }
var message = ''; var message = '';
for (i = 0; i < messageList.length; i++) { for (var k = 0; k < messageList.length; k++) {
if (typeof noty.details !== 'undefined' && typeof noty.details[messageList[i]] !== 'undefined') { if (typeof noty.details !== 'undefined' && typeof noty.details[messageList[k]] !== 'undefined') {
message = noty.details[messageList[i]]; message = noty.details[messageList[k]];
} }
} }
if (message) { if (message) {
@@ -8351,11 +8355,12 @@ speechSynthesis.getVoices();
} }
} }
} }
} else { }
for (var { ref } of this.friends.values()) { for (var { ref } of this.friends.values()) {
if (typeof ref === 'undefined' || if (typeof ref === 'undefined' ||
typeof ref.$location === 'undefined' || typeof ref.$location === 'undefined' ||
ref.$location.worldId !== D.id) { ref.$location.worldId !== D.id ||
ref.$location.instanceId === lastLocation$.instanceId) {
continue; continue;
} }
var { instanceId } = ref.$location; var { instanceId } = ref.$location;
@@ -8370,7 +8375,6 @@ speechSynthesis.getVoices();
} }
instance.users.push(ref); instance.users.push(ref);
} }
}
var rooms = []; var rooms = [];
for (var instance of Object.values(instances)) { for (var instance of Object.values(instances)) {
// due to references on callback of API.getUser() // due to references on callback of API.getUser()