From 1f43048d4a57ca71ef79e54f41a1b79559759e39 Mon Sep 17 00:00:00 2001 From: huangxiaolei <1782360262@qq.com> Date: Sat, 10 Dec 2022 23:14:59 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=98=9F=E4=BC=8D=E5=88=87?= =?UTF-8?q?=E4=BA=BAbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gs/game/user_team.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/gs/game/user_team.go b/gs/game/user_team.go index 39821661..f9e4015b 100644 --- a/gs/game/user_team.go +++ b/gs/game/user_team.go @@ -35,11 +35,10 @@ func (g *GameManager) ChangeAvatarReq(player *model.Player, payloadMsg pb.Messag logger.LOG.Error("can not find the target avatar in team, uid: %v, target avatar guid: %v", player.PlayerID, targetAvatarGuid) return } - if world.multiplayer { - world.SetPlayerLocalAvatarIndex(player, index) - } else { + if !world.multiplayer { player.TeamConfig.CurrAvatarIndex = uint8(index) } + world.SetPlayerLocalAvatarIndex(player, index) entity := scene.GetEntity(playerTeamEntity.avatarEntityMap[oldAvatarId]) if entity == nil { return