完善客户端协议

This commit is contained in:
flswld
2023-01-19 19:29:52 +08:00
parent a00bee14d0
commit 2983c16272
3254 changed files with 57101 additions and 93258 deletions
+3 -3
View File
@@ -39,10 +39,10 @@ func (g *GameManager) ChangeAvatarReq(player *model.Player, payloadMsg pb.Messag
logger.Error("can not find old avatar entity, entity id: %v", oldAvatarEntityId)
return
}
oldAvatarEntity.moveState = uint16(proto.MotionState_MOTION_STATE_STANDBY)
oldAvatarEntity.moveState = uint16(proto.MotionState_MOTION_STANDBY)
sceneEntityDisappearNotify := &proto.SceneEntityDisappearNotify{
DisappearType: proto.VisionType_VISION_TYPE_REPLACE,
DisappearType: proto.VisionType_VISION_REPLACE,
EntityList: []uint32{oldAvatarEntity.id},
}
for _, scenePlayer := range scene.playerMap {
@@ -52,7 +52,7 @@ func (g *GameManager) ChangeAvatarReq(player *model.Player, payloadMsg pb.Messag
newAvatarId := world.GetPlayerActiveAvatarId(player)
newAvatarEntity := g.PacketSceneEntityInfoAvatar(scene, player, newAvatarId)
sceneEntityAppearNotify := &proto.SceneEntityAppearNotify{
AppearType: proto.VisionType_VISION_TYPE_REPLACE,
AppearType: proto.VisionType_VISION_REPLACE,
Param: oldAvatarEntity.id,
EntityList: []*proto.SceneEntityInfo{newAvatarEntity},
}