diff options
| author | stonedDiscord <Tukz@gmx.de> | 2026-01-01 17:44:40 +0100 |
|---|---|---|
| committer | stonedDiscord <Tukz@gmx.de> | 2026-01-01 17:44:40 +0100 |
| commit | 19855fa729af4551d17672e2be3f57884f3d5e0c (patch) | |
| tree | 05a0751183f879a7d2821228f26728ffb5ecbd1b /webAO/viewport/utils/handleICSpeaking.ts | |
| parent | 01ecb948edb015613e05bc2b6da4021137957745 (diff) | |
dont use opacity
Diffstat (limited to 'webAO/viewport/utils/handleICSpeaking.ts')
| -rw-r--r-- | webAO/viewport/utils/handleICSpeaking.ts | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/webAO/viewport/utils/handleICSpeaking.ts b/webAO/viewport/utils/handleICSpeaking.ts index c0a9ae1..cf75a80 100644 --- a/webAO/viewport/utils/handleICSpeaking.ts +++ b/webAO/viewport/utils/handleICSpeaking.ts @@ -161,11 +161,16 @@ export const handle_ic_speaking = async (playerChatMsg: ChatMsg) => { shoutSprite.src = client.resources[shout].src; shoutSprite.style.animation = "bubble 700ms steps(10, jump-both)"; } - shoutSprite.style.opacity = "1"; + shoutSprite.style.display = "block"; - client.viewport.shoutaudio.src = `${AO_HOST}characters/${encodeURI( + const perCharPath = `${AO_HOST}characters/${encodeURI( client.viewport.getChatmsg().name.toLowerCase(), )}/${shout}.opus`; + client.viewport.shoutaudio.src = perCharPath; + client.viewport.shoutaudio.onerror = () => { + client.viewport.shoutaudio.src = client.resources[shout].sfx; + client.viewport.shoutaudio.play(); + }; client.viewport.shoutaudio.play(); client.viewport.setShoutTimer(client.resources[shout].duration); } else { |
