mirror of
https://github.com/osukey/osukey.git
synced 2025-05-29 17:37:23 +09:00
Merge pull request #4770 from HoLLy-HaCKeR/fix-ctb-2b-diffcalc
Fix order of nested hitobjects on 2B Catch maps
This commit is contained in:
commit
6e0fbaa96d
@ -57,33 +57,20 @@ namespace osu.Game.Rulesets.Catch.Difficulty
|
|||||||
|
|
||||||
CatchHitObject lastObject = null;
|
CatchHitObject lastObject = null;
|
||||||
|
|
||||||
foreach (var hitObject in beatmap.HitObjects.OfType<CatchHitObject>())
|
// 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 })
|
||||||
|
.Cast<CatchHitObject>()
|
||||||
|
.OrderBy(x => x.StartTime))
|
||||||
{
|
{
|
||||||
if (lastObject == null)
|
// We want to only consider fruits that contribute to the combo.
|
||||||
{
|
if (hitObject is BananaShower || hitObject is TinyDroplet)
|
||||||
lastObject = hitObject;
|
|
||||||
continue;
|
continue;
|
||||||
}
|
|
||||||
|
|
||||||
switch (hitObject)
|
if (lastObject != null)
|
||||||
{
|
yield return new CatchDifficultyHitObject(hitObject, lastObject, clockRate, halfCatchWidth);
|
||||||
// We want to only consider fruits that contribute to the combo. Droplets are addressed as accuracy and spinners are not relevant for "skill" calculations.
|
|
||||||
case Fruit fruit:
|
|
||||||
yield return new CatchDifficultyHitObject(fruit, lastObject, clockRate, halfCatchWidth);
|
|
||||||
|
|
||||||
lastObject = hitObject;
|
lastObject = hitObject;
|
||||||
break;
|
|
||||||
|
|
||||||
case JuiceStream _:
|
|
||||||
foreach (var nested in hitObject.NestedHitObjects.OfType<CatchHitObject>().Where(o => !(o is TinyDroplet)))
|
|
||||||
{
|
|
||||||
yield return new CatchDifficultyHitObject(nested, lastObject, clockRate, halfCatchWidth);
|
|
||||||
|
|
||||||
lastObject = nested;
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user