From be3cec9d6fe90a7755b9674036f8721f74cf35e1 Mon Sep 17 00:00:00 2001 From: Natsumi Date: Sat, 3 Apr 2021 13:59:28 +1300 Subject: [PATCH] More onPlayerJoing changes --- html/src/app.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/html/src/app.js b/html/src/app.js index 6de260a9..827f6509 100644 --- a/html/src/app.js +++ b/html/src/app.js @@ -3755,20 +3755,21 @@ speechSynthesis.getVoices(); continue; } } + var playersInInstance = this.lastLocation.playerList; + if (playersInInstance.includes(ctx.displayName)) { + continue; + } var joining = true; var gameLogTable = this.gameLogTable.data; for (var k = gameLogTable.length - 1; k > -1; k--) { var gameLogItem = gameLogTable[k]; - console.log(gameLogItem); if (gameLogItem.type === 'Notification') { continue; } if ((gameLogItem.type === 'Location') || (gameLogItem.created_at < bias)) { - console.log('break'); break; } if ((gameLogItem.type === 'OnPlayerJoined') && (gameLogItem.data === ctx.displayName)) { - console.log('joining'); joining = false; break; }