From 15c065bf3dfc1f844b5e7e2f02ff83a811c5aa07 Mon Sep 17 00:00:00 2001 From: mengxinzxz <139629761+mengxinzxz@users.noreply.github.com> Date: Wed, 11 Oct 2023 16:19:49 +0800 Subject: [PATCH] =?UTF-8?q?die=5Faudio=E6=B7=BB=E5=8A=A0=E6=92=AD=E6=94=BE?= =?UTF-8?q?=E6=9C=AC=E4=BD=93=E4=BB=BB=E6=84=8F=E6=AD=A6=E5=B0=86=E9=98=B5?= =?UTF-8?q?=E4=BA=A1=E9=85=8D=E9=9F=B3=E7=9A=84=E6=9C=BA=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- game/game.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/game/game.js b/game/game.js index f2c328d43..359297e3e 100644 --- a/game/game.js +++ b/game/game.js @@ -19926,8 +19926,10 @@ game.playAudio(path); } } - else if(lib.character[player.name]&&lib.character[player.name][4].contains('die_audio')){ - game.playAudio('die',player.name); + else if(lib.character[player.name]&&lib.character[player.name][4].some(tag=>tag.startsWith('die_audio'))){ + var tag=lib.character[player.name][4].find(tag=>tag.startsWith('die_audio')); + var list=tag.split(':').slice(1); + game.playAudio('die',list.length?list[0]:player.name); } else{ game.playAudio('die',player.name,function(){