diff options
| author | sD <stoned@derpymail.org> | 2020-05-11 20:26:05 +0200 |
|---|---|---|
| committer | sD <stoned@derpymail.org> | 2020-05-11 20:26:05 +0200 |
| commit | 481198c88421e7c97163edae5861238d620b6730 (patch) | |
| tree | f5ceb5c8938369314f8eac79e327fa596e455e75 /webAO/client.js | |
| parent | d78974be8714052e1a57b5d97a090757bf664a71 (diff) | |
don't load all the chars at once
Diffstat (limited to 'webAO/client.js')
| -rw-r--r-- | webAO/client.js | 6 |
1 files changed, 4 insertions, 2 deletions
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#%"); |
