fix:优化比赛tips展示逻辑

This commit is contained in:
2026-05-13 13:42:22 +08:00
parent 6cb5288631
commit c298e258cc
2 changed files with 7 additions and 4 deletions

View File

@@ -60,7 +60,8 @@ async function onReceiveMessage(message) {
audioManager.play("比赛结束", false);
} else if (type === MESSAGETYPESV2.ShootResult) {
if (melee.value && current.playerId !== user.value.id) return;
if (current.playerId === user.value.id) currentShot.value++;
// 仅计用户自己的命中箭,并加上限防护,防止超过 totalShot如重入时 currentShot 初始值偏高)
if (current.playerId === user.value.id && currentShot.value < totalShot.value) currentShot.value++;
if (message.shootData) {
let key = [];
key.push(