fix:比赛射箭数改为用indexMap字段展示
This commit is contained in:
@@ -60,8 +60,8 @@ async function onReceiveMessage(message) {
|
||||
audioManager.play("比赛结束", false);
|
||||
} else if (type === MESSAGETYPESV2.ShootResult) {
|
||||
if (melee.value && current.playerId !== user.value.id) return;
|
||||
// 直接使用后端返回的 myIndex(当前用户已射箭数),不在前端自增
|
||||
if (current.playerId === user.value.id) currentShot.value = current.myIndex ?? currentShot.value;
|
||||
// 从 indexMap 按当前用户 id 取已射箭数,由后端维护准确值,不在前端自增
|
||||
if (current.playerId === user.value.id) currentShot.value = current.indexMap?.[user.value.id] ?? currentShot.value;
|
||||
if (message.shootData) {
|
||||
let key = [];
|
||||
key.push(
|
||||
|
||||
Reference in New Issue
Block a user