1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-17 09:39:04 +08:00

Fix incorrect handling of nested objects when inside parent object's duration

This commit is contained in:
Dean Herbert 2024-05-29 23:30:47 +09:00
parent 126837fadd
commit fdb47f8dfa
No known key found for this signature in database

View File

@ -74,11 +74,15 @@ namespace osu.Game.Screens.Edit.GameplayTest
static IEnumerable<HitObject> enumerateHitObjects(IEnumerable<HitObject> hitObjects, double cutoffTime) static IEnumerable<HitObject> enumerateHitObjects(IEnumerable<HitObject> hitObjects, double cutoffTime)
{ {
foreach (var hitObject in hitObjects.Where(h => h.GetEndTime() < cutoffTime)) foreach (var hitObject in hitObjects)
{ {
foreach (var nested in enumerateHitObjects(hitObject.NestedHitObjects, cutoffTime)) foreach (var nested in enumerateHitObjects(hitObject.NestedHitObjects, cutoffTime))
{
if (nested.GetEndTime() < cutoffTime)
yield return nested; yield return nested;
}
if (hitObject.GetEndTime() < cutoffTime)
yield return hitObject; yield return hitObject;
} }
} }