aboutsummaryrefslogtreecommitdiff
path: root/webAO
diff options
context:
space:
mode:
authorsD <stoned@derpymail.org>2020-08-11 20:09:31 +0200
committersD <stoned@derpymail.org>2020-08-11 20:09:31 +0200
commitf756da675213c9937259d07a0166a179656a1284 (patch)
tree339c374154808518d49410564f5a5ea0fd039021 /webAO
parent5ab213af6caa0ef3e3d2b9143f00bad95510e03e (diff)
play effect sfx if there isn't another already
Diffstat (limited to 'webAO')
-rw-r--r--webAO/client.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/webAO/client.js b/webAO/client.js
index 0cefa5c..f65d3d8 100644
--- a/webAO/client.js
+++ b/webAO/client.js
@@ -1793,7 +1793,10 @@ async changeBackground(position) {
if (effectinfo[0])
fg.src = `${AO_HOST}themes/default/effects/${encodeURI(effectinfo[0].toLowerCase())}.webp`;
else
- fg.src = transparentPNG;
+ fg.src = transparentPNG;
+
+ if (this.chatmsg.sound === "0" || this.chatmsg.sound === "1" || this.chatmsg.sound === "" || this.chatmsg.sound === undefined)
+ this.chatmsg.sound = effectinfo[2];
this.tick();
}