fix panic

This commit is contained in:
flswld
2023-03-22 11:41:16 +08:00
parent f99d845d57
commit b5267d57d8
4 changed files with 76 additions and 52 deletions

View File

@@ -321,6 +321,9 @@ func (g *GameManager) AoiPlayerMove(player *model.Player, oldPos *model.Vector,
}
// 旧有新没有的group即为消失的
group := scene.GetGroupById(groupId)
if group == nil {
continue
}
for _, entity := range group.GetAllEntity() {
delEntityIdList = append(delEntityIdList, entity.GetId())
}