修复未在队伍角色无法更换时装的问题

顺便给获取scene的都判断了下nil
This commit is contained in:
UnKownOwO
2023-02-15 19:39:44 +08:00
parent 2e2159f309
commit 76b417f3f4
11 changed files with 136 additions and 7 deletions

View File

@@ -400,6 +400,10 @@ func (g *GameManager) UserWorldRemovePlayer(world *World, player *model.Player)
}
}
scene := world.GetSceneById(player.SceneId)
if scene == nil {
logger.Error("scene is nil, sceneId: %v", player.SceneId)
return
}
// 仅仅把当前的场上角色的实体消失掉
activeAvatarId := world.GetPlayerActiveAvatarId(player)