mirror of
https://github.com/FlourishingWorld/hk4e.git
synced 2026-03-01 00:35:36 +08:00
世界怪物、NPC、装置等场景实体读取lua配置生成,实现AOI九宫格动态加载
This commit is contained in:
@@ -95,7 +95,10 @@ func NewGameManager(dao *dao.Dao, messageQueue *mq.MessageQueue, gsId uint32, gs
|
||||
USER_MANAGER.SetRemoteUserOnlineState(BigWorldAiUid, true, mainGsAppid)
|
||||
if r.IsMainGs() {
|
||||
// TODO 测试
|
||||
for i := 1; i < 8; i++ {
|
||||
r.ai.Pos.X -= random.GetRandomFloat64(25.0, 35.0)
|
||||
r.ai.Pos.Y += 1.0
|
||||
r.ai.Pos.Z += random.GetRandomFloat64(25.0, 35.0)
|
||||
for i := 1; i < 3; i++ {
|
||||
uid := 1000000 + uint32(i)
|
||||
avatarId := uint32(0)
|
||||
for _, avatarData := range gdconf.CONF.AvatarDataMap {
|
||||
@@ -109,8 +112,9 @@ func NewGameManager(dao *dao.Dao, messageQueue *mq.MessageQueue, gsId uint32, gs
|
||||
AvatarTeamGuidList: []uint64{robot.AvatarMap[avatarId].Guid},
|
||||
CurAvatarGuid: robot.AvatarMap[avatarId].Guid,
|
||||
})
|
||||
robot.Pos.X += random.GetRandomFloat64(0.0, 1.0)
|
||||
robot.Pos.Z += random.GetRandomFloat64(0.0, 1.0)
|
||||
robot.Pos.X -= random.GetRandomFloat64(25.0, 35.0)
|
||||
robot.Pos.Y += 1.0
|
||||
robot.Pos.Z += random.GetRandomFloat64(25.0, 35.0)
|
||||
r.UserWorldAddPlayer(WORLD_MANAGER.GetAiWorld(), robot)
|
||||
}
|
||||
}
|
||||
@@ -170,7 +174,7 @@ func (g *GameManager) gameMainLoop() {
|
||||
logger.Error("error: %v", err)
|
||||
logger.Error("stack: %v", logger.Stack())
|
||||
motherfuckerPlayerInfo, _ := json.Marshal(SELF)
|
||||
logger.Error("the motherfucker player info: %v", motherfuckerPlayerInfo)
|
||||
logger.Error("the motherfucker player info: %v", string(motherfuckerPlayerInfo))
|
||||
if SELF != nil {
|
||||
GAME_MANAGER.DisconnectPlayer(SELF.PlayerID, kcp.EnetServerKick)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user