diff options
| author | sD <stoned@derpymail.org> | 2020-02-15 20:38:24 +0100 |
|---|---|---|
| committer | sD <stoned@derpymail.org> | 2020-02-15 20:38:24 +0100 |
| commit | 0a21911b3cc3f8de444c5b1da80c742cd74c611f (patch) | |
| tree | 9be9f746358ef7b960e3c05d4914e4c1b604a81e /webAO/client.js | |
| parent | 39882cba4412b1c033dd6e0988a5e2d96ec9f072 (diff) | |
change blips too
Diffstat (limited to 'webAO/client.js')
| -rw-r--r-- | webAO/client.js | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/webAO/client.js b/webAO/client.js index f0a74d8..6aaa8e9 100644 --- a/webAO/client.js +++ b/webAO/client.js @@ -375,7 +375,7 @@ class Client extends EventEmitter { changeMusicVolume(); document.getElementById("client_sfxaudio").volume = getCookie("sfxVolume"); changeSFXVolume(); - document.getElementById("client_bvolume").value = getCookie("blipVolume"); + document.getElementById("client_blipaudio0").value = getCookie("blipVolume"); changeBlipVolume(); document.getElementById("ic_chat_name").value = getCookie("ic_chat_name"); @@ -1179,9 +1179,11 @@ class Viewport { // Allocate multiple blip audio channels to make blips less jittery - this.blipChannels = new Array(6); - this.blipChannels.fill(new Audio(AO_HOST + "sounds/general/sfx-blipmale.wav")) - .forEach(channel => channel.volume = 0.5); + this.blipChannels = [document.getElementById("client_blipaudio0"), + document.getElementById("client_blipaudio1"), + document.getElementById("client_blipaudio2"), + document.getElementById("client_blipaudio3")]; + this.currentBlipChannel = 0; this.sfxaudio = document.getElementById("client_sfxaudio"); @@ -1860,8 +1862,8 @@ window.changeSFXVolume = changeSFXVolume; * Triggered by the blip volume slider. */ export function changeBlipVolume() { - viewport.blipVolume = document.getElementById("client_bvolume").value / 100; - setCookie("blipVolume", document.getElementById("client_bvolume").value); + viewport.blipVolume = document.getElementById("client_blipaudio0").volume; + setCookie("blipVolume", document.getElementById("client_blipaudio0").volume); } window.changeBlipVolume = changeBlipVolume; |
