场景组管理和场景实体玩家视野管理分离

This commit is contained in:
flswld
2023-03-27 17:11:09 +08:00
parent fed2c3ca4a
commit b396bc2e57
6 changed files with 331 additions and 382 deletions
+3
View File
@@ -78,6 +78,9 @@ func (g *GameManager) ChangeAvatarReq(player *model.Player, payloadMsg pb.Messag
func (g *GameManager) SetUpAvatarTeamReq(player *model.Player, payloadMsg pb.Message) {
req := payloadMsg.(*proto.SetUpAvatarTeamReq)
world := WORLD_MANAGER.GetWorldByID(player.WorldId)
if world == nil {
return
}
if world.GetMultiplayer() {
g.SendError(cmd.SetUpAvatarTeamRsp, player, &proto.SetUpAvatarTeamRsp{})
return