From 481198c88421e7c97163edae5861238d620b6730 Mon Sep 17 00:00:00 2001 From: sD Date: Mon, 11 May 2020 20:26:05 +0200 Subject: don't load all the chars at once --- webAO/client.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'webAO/client.js') diff --git a/webAO/client.js b/webAO/client.js index d2676f9..8119821 100644 --- a/webAO/client.js +++ b/webAO/client.js @@ -761,7 +761,8 @@ class Client extends EventEmitter { if (i % 2 === 0) { document.getElementById("client_loadingtext").innerHTML = `Loading Character ${i}/${this.char_list_length}`; const chargs = args[i].split("&"); - this.handleCharacterInfo(chargs, args[i - 1]); + const charid = args[i - 1]; + setTimeout(() => this.handleCharacterInfo(chargs, charid), charid*10); } } // Request the next pack @@ -778,7 +779,8 @@ class Client extends EventEmitter { for (let i = 1; i < args.length; i++) { document.getElementById("client_loadingtext").innerHTML = `Loading Character ${i}/${this.char_list_length}`; const chargs = args[i].split("&"); - this.handleCharacterInfo(chargs, i - 1); + const charid = i - 1; + setTimeout(() => this.handleCharacterInfo(chargs, charid), charid*10); } // We're done with the characters, request the music this.sendServer("RM#%"); -- cgit