mirror of
https://github.com/FlourishingWorld/hk4e.git
synced 2026-03-01 00:35:36 +08:00
修复队伍切人bug
This commit is contained in:
@@ -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)
|
logger.LOG.Error("can not find the target avatar in team, uid: %v, target avatar guid: %v", player.PlayerID, targetAvatarGuid)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if world.multiplayer {
|
if !world.multiplayer {
|
||||||
world.SetPlayerLocalAvatarIndex(player, index)
|
|
||||||
} else {
|
|
||||||
player.TeamConfig.CurrAvatarIndex = uint8(index)
|
player.TeamConfig.CurrAvatarIndex = uint8(index)
|
||||||
}
|
}
|
||||||
|
world.SetPlayerLocalAvatarIndex(player, index)
|
||||||
entity := scene.GetEntity(playerTeamEntity.avatarEntityMap[oldAvatarId])
|
entity := scene.GetEntity(playerTeamEntity.avatarEntityMap[oldAvatarId])
|
||||||
if entity == nil {
|
if entity == nil {
|
||||||
return
|
return
|
||||||
|
|||||||
Reference in New Issue
Block a user