From ca069ddfc5e06b7f49ddbdd50b5cd06edc5ddd6e Mon Sep 17 00:00:00 2001 From: stonedDiscord Date: Tue, 7 Sep 2021 18:52:38 +0200 Subject: parse fading arg and discard it --- webAO/client.js | 1 + 1 file changed, 1 insertion(+) (limited to 'webAO') diff --git a/webAO/client.js b/webAO/client.js index 20006ab..4c5ae8b 100644 --- a/webAO/client.js +++ b/webAO/client.js @@ -758,6 +758,7 @@ class Client extends EventEmitter { const showname = args[3] || ""; const looping = Boolean(args[4]); const channel = Number(args[5]) || 0; + const fading = Number(args[6]) || 0; // unused in web const music = viewport.music[channel]; let musicname; -- cgit From 4fcd41014846ff3c9976362ab8d5473e519fef91 Mon Sep 17 00:00:00 2001 From: stonedDiscord Date: Tue, 7 Sep 2021 19:39:38 +0200 Subject: fix multi channel music --- webAO/client.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'webAO') diff --git a/webAO/client.js b/webAO/client.js index 4c5ae8b..ec78007 100644 --- a/webAO/client.js +++ b/webAO/client.js @@ -1643,7 +1643,7 @@ class Viewport { this.blipChannels = new Array(6); this.blipChannels.fill(new Audio(AO_HOST + "sounds/general/sfx-blipmale.opus")) - .forEach(channel => channel.volume = 0.5); + this.blipChannels.forEach(channel => channel.volume = 0.5); this.currentBlipChannel = 0; this.sfxaudio = document.getElementById("client_sfxaudio"); @@ -1657,9 +1657,11 @@ class Viewport { this.testimonyAudio = document.getElementById("client_testimonyaudio"); this.testimonyAudio.src = `${AO_HOST}sounds/general/sfx-guilty.opus`; - this.music = new Array(3); - this.music.fill(new Audio(`${AO_HOST}sounds/music/trial (aa).opus`)) - .forEach(channel => channel.volume = 0.5); + this.music = new Array( new Audio(`${AO_HOST}sounds/music/trial (aa).opus`), + new Audio(`${AO_HOST}sounds/music/trial (aa).opus`), + new Audio(`${AO_HOST}sounds/music/trial (aa).opus`), + new Audio(`${AO_HOST}sounds/music/trial (aa).opus`)); + this.music.forEach(channel => channel.volume = 0.5); this.updater = null; this.testimonyUpdater = null; -- cgit From 3467fb7d85f63dd1804f8deb5bd8a4e3d4d16f15 Mon Sep 17 00:00:00 2001 From: stonedDiscord Date: Tue, 7 Sep 2021 19:43:59 +0200 Subject: fix blips lmao --- webAO/client.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'webAO') diff --git a/webAO/client.js b/webAO/client.js index ec78007..9b17528 100644 --- a/webAO/client.js +++ b/webAO/client.js @@ -1641,8 +1641,12 @@ 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.opus")) + 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")); this.blipChannels.forEach(channel => channel.volume = 0.5); this.currentBlipChannel = 0; -- cgit From 856904681e07cdddc31ff3dbf35a15fa28191b9a Mon Sep 17 00:00:00 2001 From: stonedDiscord Date: Tue, 7 Sep 2021 19:45:07 +0200 Subject: make areas without a status green --- webAO/styles/client.css | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'webAO') diff --git a/webAO/styles/client.css b/webAO/styles/client.css index b00718e..943605f 100644 --- a/webAO/styles/client.css +++ b/webAO/styles/client.css @@ -537,6 +537,10 @@ background-color: rgb(54, 198, 68); } +.area- { /* THANKS CW */ + background-color: rgb(54, 198, 68); +} + .area-idle { background-color: rgb(54, 198, 68); } -- cgit From 60a9867a0551753101f5b4d692fa5a9ea77aba2a Mon Sep 17 00:00:00 2001 From: stonedDiscord Date: Sat, 18 Sep 2021 16:00:43 +0200 Subject: try to load opus versions of mp3 tracks if they are missing --- webAO/client.html | 6 +++--- webAO/client.js | 21 ++++++++++++++++++++- 2 files changed, 23 insertions(+), 4 deletions(-) (limited to 'webAO') diff --git a/webAO/client.html b/webAO/client.html index dd036a6..a31938c 100644 --- a/webAO/client.html +++ b/webAO/client.html @@ -373,13 +373,13 @@ onchange="changeMusicVolume()">

SFX

- +

Shouts

- +

Testimony/Guilty

- +

Blip

channel.volume = 0.5); + this.blipChannels.forEach(channel => channel.onerror = opusCheck(channel)); this.currentBlipChannel = 0; this.sfxaudio = document.getElementById("client_sfxaudio"); @@ -1666,6 +1667,7 @@ class Viewport { new Audio(`${AO_HOST}sounds/music/trial (aa).opus`), new Audio(`${AO_HOST}sounds/music/trial (aa).opus`)); this.music.forEach(channel => channel.volume = 0.5); + this.music.forEach(channel => channel.onerror = opusCheck(channel)); this.updater = null; this.testimonyUpdater = null; @@ -2691,6 +2693,23 @@ export function imgError(image) { } window.imgError = imgError; +/** + * Triggered when there was an error loading a sound + * @param {HTMLImageElement} image the element containing the missing sound + */ + export function opusCheck(channel) { + console.info(channel) + console.info("failed to load sound "+channel.src) + let oldsrc = "" + oldsrc = channel.src + if(!oldsrc.endsWith(".opus")) { + newsrc = oldsrc.replace(".mp3",".opus") + newsrc = newsrc.replace(".wav",".opus") + channel.src = newsrc; //unload so the old sprite doesn't persist + } +} +window.opusCheck = opusCheck; + /** * Make a GET request for a specific URI. * @param {string} url the URI to be requested -- cgit From 742856f3c8ab0e7bc70b2f21fe305c6b524414bb Mon Sep 17 00:00:00 2001 From: stonedDiscord Date: Fri, 24 Sep 2021 16:12:12 +0200 Subject: don't replace the preanim name with - --- webAO/client.js | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'webAO') diff --git a/webAO/client.js b/webAO/client.js index 01413a8..34e5718 100644 --- a/webAO/client.js +++ b/webAO/client.js @@ -2420,19 +2420,22 @@ export function onEnter(event) { let sfxname = "0"; let sfxdelay = 0; - let preanim = "-"; + let emote_mod = myemo.zoom; if (document.getElementById("sendsfx").checked) { sfxname = myemo.sfx; sfxdelay = myemo.sfxdelay; } + // not to overwrite a 5 from the ini or anything else if (document.getElementById("sendpreanim").checked) { - preanim = myemo.preanim; - } + if (emote_mod === 0) + emote_mod = 1; + } else if (emote_mod === 1) + emote_mod = 0; - client.sendIC("chat", preanim, mychar.name, myemo.emote, + client.sendIC("chat", myemo.preanim, mychar.name, myemo.emote, text, myrole, - sfxname, myemo.zoom, sfxdelay, selectedShout, evi, flip, + sfxname, emote_mod, sfxdelay, selectedShout, evi, flip, flash, color, showname, pairchar, pairoffset, pairyoffset, noninterrupting_preanim, looping_sfx, screenshake, "-", "-", "-", additive, effect); } } -- cgit