aboutsummaryrefslogtreecommitdiff
path: root/webAO
diff options
context:
space:
mode:
authorstonedDiscord <Tukz@gmx.de>2021-10-09 12:49:30 +0200
committerstonedDiscord <Tukz@gmx.de>2021-10-09 12:49:30 +0200
commit4fad7760dbd091f58f1c70ef12bb9064273c7d08 (patch)
treecc17d53783bbbb0e94d7f1c390208e1aa4e3e583 /webAO
parent904b588290ffa9409eecfe3a39a0001b33ebb764 (diff)
copy client logic for playing sfx
fix #88
Diffstat (limited to 'webAO')
-rw-r--r--webAO/client.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/webAO/client.js b/webAO/client.js
index 8852a9c..f818ce9 100644
--- a/webAO/client.js
+++ b/webAO/client.js
@@ -2336,7 +2336,7 @@ async changeBackground(position) {
if (!this.sfxplayed && this.chatmsg.snddelay + this.shoutTimer >= this.textTimer) {
this.sfxplayed = 1;
- if (this.chatmsg.sound !== "0" && this.chatmsg.sound !== "1" && this.chatmsg.sound !== "" && this.chatmsg.sound !== undefined) {
+ if (this.chatmsg.sound !== "0" && this.chatmsg.sound !== "1" && this.chatmsg.sound !== "" && this.chatmsg.sound !== undefined && (this.chatmsg.type == 1 || this.chatmsg.type == 2 || this.chatmsg.type == 6)) {
this.playSFX(AO_HOST + "sounds/general/" + encodeURI(this.chatmsg.sound.toLowerCase()) + ".opus", this.chatmsg.looping_sfx);
}
}