mirror of
https://github.com/FlourishingWorld/hk4e.git
synced 2026-03-01 00:35:36 +08:00
大世界AOI广播域隔离
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user