fix bitset bugs

This commit is contained in:
Tnze
2022-05-28 01:48:36 +08:00
parent 29ce03be31
commit 02dd436014
6 changed files with 30 additions and 25 deletions

View File

@ -23,7 +23,7 @@ func (p playerSpawnSystem) Update(w *ecs.World) {
pos, rot := ecs.GetComponent[server.Pos](w), ecs.GetComponent[server.Rot](w)
profiles := ecs.GetComponent[PlayerProfile](w)
dimensionRes := ecs.GetResource[world.DimensionList](w)
players.AndNot(profiles.BitSetLike).Range(func(eid ecs.Index) {
players.AndNot(profiles.BitSet).Range(func(eid ecs.Index) {
player := players.GetValue(eid)
client := clients.GetValue(eid)
profile, err := p.GetPlayer(player.UUID)