From f756da675213c9937259d07a0166a179656a1284 Mon Sep 17 00:00:00 2001 From: sD Date: Tue, 11 Aug 2020 20:09:31 +0200 Subject: play effect sfx if there isn't another already --- webAO/client.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'webAO/client.js') 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(); } -- cgit