diff options
| author | Caleb Mabry <36182383+caleb-mabry@users.noreply.github.com> | 2022-03-23 15:31:04 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-03-23 15:31:04 -0400 |
| commit | 46d63b5ba4eeb30ac1f5add49b03b1aed8ae0328 (patch) | |
| tree | 228ef1f017ce0320f3d210a557d2803a03ec73e1 /webAO/client.js | |
| parent | 0b6b4b085cee48248fe2025a2514252ee20ee774 (diff) | |
| parent | 2e734ec14fc760f80e2a9dc81cdf9269220bb791 (diff) | |
Merge branch 'master' into moving-audio-channels
Diffstat (limited to 'webAO/client.js')
| -rw-r--r-- | webAO/client.js | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/webAO/client.js b/webAO/client.js index 739f170..e9eb13a 100644 --- a/webAO/client.js +++ b/webAO/client.js @@ -798,7 +798,7 @@ class Client extends EventEmitter { } } }; - await getCharIcon(); + getCharIcon(); // If the ini doesn't exist on the server this will throw an error try { @@ -1218,8 +1218,6 @@ class Client extends EventEmitter { document.getElementById('client_loading').style.display = 'none'; if (mode === 'watch') { // Spectators don't need to pick a character document.getElementById('client_charselect').style.display = 'none'; - } else { - document.getElementById('client_charselect').style.display = 'block'; } } @@ -1674,15 +1672,8 @@ class Viewport { ]; // Allocate multiple blip audio channels to make blips less jittery - - this.blipChannels = new Array( - new Audio(`${AO_HOST}sounds/general/sfx-blipmale.opus`), - new Audio(`${AO_HOST}sounds/general/sfx-blipmale.opus`), - new Audio(`${AO_HOST}sounds/general/sfx-blipmale.opus`), - new Audio(`${AO_HOST}sounds/general/sfx-blipmale.opus`), - new Audio(`${AO_HOST}sounds/general/sfx-blipmale.opus`), - new Audio(`${AO_HOST}sounds/general/sfx-blipmale.opus`), - ); + const blipSelectors = document.getElementsByClassName('blipSound') + this.blipChannels = [...blipSelectors]; this.blipChannels.forEach((channel) => channel.volume = 0.5); this.blipChannels.forEach((channel) => channel.onerror = opusCheck(channel)); this.currentBlipChannel = 0; @@ -3125,3 +3116,4 @@ export function toggleShout(shout) { } } window.toggleShout = toggleShout; +export default Client |
