From 9ef2b0f9f6ef47c3f02b48d2f26f72a4c981f717 Mon Sep 17 00:00:00 2001 From: Natsumi Date: Sun, 28 Mar 2021 18:25:13 +1300 Subject: [PATCH] Revert, breaks current user instance timer --- html/src/app.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/html/src/app.js b/html/src/app.js index 467b0fcc..f695853d 100644 --- a/html/src/app.js +++ b/html/src/app.js @@ -7472,7 +7472,10 @@ speechSynthesis.getVoices(); } if (this.isGameRunning && this.lastLocation.location === L.tag) { - var ref = API.currentUser; + var ref = API.cachedUsers.get(API.currentUser.id); + if (typeof ref === 'undefined') { + ref = API.currentUser; + } var playersInInstance = this.lastLocation.playerList; if (playersInInstance.includes(ref.displayName)) { users.push(ref); @@ -8027,7 +8030,10 @@ speechSynthesis.getVoices(); }; instances[instance.id] = instance; } - var ref = API.currentUser; + var ref = API.cachedUsers.get(API.currentUser.id); + if (typeof ref === 'undefined') { + ref = API.currentUser; + } var playersInInstance = this.lastLocation.playerList; if (playersInInstance.includes(ref.displayName)) { instance.users.push(ref);