大世界AOI广播域隔离

This commit is contained in:
flswld
2023-04-10 19:32:16 +08:00
parent 5a043a9482
commit b5faba4151
22 changed files with 677 additions and 666 deletions

View File

@@ -327,6 +327,10 @@ func (w *World) GetWorldPlayerNum() int {
return len(w.playerMap)
}
func (w *World) GetBigWorldAoi() *alg.AoiManager {
return w.bigWorldAoi
}
func (w *World) AddPlayer(player *model.Player, sceneId uint32) {
w.peerList = append(w.peerList, player)
w.playerMap[player.PlayerID] = player
@@ -714,6 +718,9 @@ func (w *World) UpdateMultiplayerTeam() {
// 世界聊天
func (w *World) AddChat(chatInfo *proto.ChatInfo) {
if len(w.chatMsgList) > 100 {
w.chatMsgList = w.chatMsgList[1:]
}
w.chatMsgList = append(w.chatMsgList, chatInfo)
}