Skip to content

Commit

Permalink
Merge pull request #31 from art0007i/main
Browse files Browse the repository at this point in the history
performance thing that froox does all the time
  • Loading branch information
Xlinka authored May 3, 2024
2 parents 2ea3ad0 + 82e6bcf commit f429843
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions ProjectObsidian/ProtoFlux/Avatar/AvatarRootSlot.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,12 @@ protected override Slot Compute(ExecutionContext context)
if (user == null) return null;

Slot slot = user.Root.Slot;
List<AvatarRoot> list = new List<AvatarRoot>();
List<AvatarRoot> list = Pool.BorrowList<AvatarRoot>();
slot.GetFirstDirectComponentsInChildren(list);
if (list.Count == 0) return null;
Slot avatarRoot = list.FirstOrDefault()?.Slot;
Pool.Return(ref list);

return list[0].Slot;
return avatarRoot;
}
}
}
}

0 comments on commit f429843

Please sign in to comment.