修改地图结构

This commit is contained in:
1
2025-10-10 04:31:52 +00:00
parent 6b06c580ff
commit ac671408f7
2 changed files with 16 additions and 15 deletions

View File

@@ -14,8 +14,9 @@ import (
func (h *Controller) MapEnter(data *maps.InInfo, c *player.Player) (result *maps.OutInfo, err errorcode.ErrorCode) { //这个时候player应该是空的
c.Info.MapID = data.MapId //登录地图
space.GetSpace(c.Info.MapID).Set(c.Info.UserID, c) //添加玩家
c.Info.MapID = data.MapId //登录地图
t := space.GetSpace(c.Info.MapID)
t.Set(c.Info.UserID, c) //添加玩家
result = maps.NewOutInfo()
c.Info.Pos = data.Point
copier.Copy(result, c.Info)