Bug fixes

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

View File

@@ -3922,21 +3922,25 @@ 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
for (var k = w - 1; k > -1; k--) { if (this.hideOnPlayerJoined) {
var feedItem = wristArr[k]; for (var k = w - 1; k > -1; k--) {
if ((feedItem.created_at > locationBias) || (feedItem.type === 'Location')) { var feedItem = wristArr[k];
if ((feedItem.created_at > locationBias) || (feedItem.type === 'Location')) {
break; break;
} }
if (feedItem.type === 'OnPlayerJoined') { if (feedItem.type === 'OnPlayerJoined') {
wristArr.splice(k, 1); wristArr.splice(k, 1);
w--; w--;
}
} }
} }
for (var k = n - 1; k > -1; k--) { for (var k = n - 1; k > -1; k--) {
@@ -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,14 +8355,15 @@ 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 ||
continue; ref.$location.instanceId === lastLocation$.instanceId) {
} continue;
var { instanceId } = ref.$location; }
var { instanceId } = ref.$location;
var instance = instances[instanceId]; var instance = instances[instanceId];
if (typeof instance === 'undefined') { if (typeof instance === 'undefined') {
instance = { instance = {
@@ -8367,9 +8372,8 @@ speechSynthesis.getVoices();
users: [] users: []
}; };
instances[instanceId] = instance; instances[instanceId] = instance;
}
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)) {