From 4fad7760dbd091f58f1c70ef12bb9064273c7d08 Mon Sep 17 00:00:00 2001 From: stonedDiscord Date: Sat, 9 Oct 2021 12:49:30 +0200 Subject: copy client logic for playing sfx fix #88 --- webAO/client.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); } } -- cgit