mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 16:29:58 +09:00
Reduce NestedHitObject
enumerator overhead
This was especially bad due to it allocating on any and every start time change, even the first (see usage in `HitObject.ctor`).
This commit is contained in:
@ -52,7 +52,7 @@ namespace osu.Game.Rulesets.Catch.Difficulty
|
||||
|
||||
// In 2B beatmaps, it is possible that a normal Fruit is placed in the middle of a JuiceStream.
|
||||
foreach (var hitObject in beatmap.HitObjects
|
||||
.SelectMany(obj => obj is JuiceStream stream ? stream.NestedHitObjects : new[] { obj })
|
||||
.SelectMany(obj => obj is JuiceStream stream ? stream.NestedHitObjects.AsEnumerable() : new[] { obj })
|
||||
.Cast<CatchHitObject>()
|
||||
.OrderBy(x => x.StartTime))
|
||||
{
|
||||
|
Reference in New Issue
Block a user