1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 08:33:21 +08:00

Revert sample lookup logic that was not allocating anything

This commit is contained in:
Dean Herbert 2024-02-18 03:18:50 +08:00
parent 22f5a66c02
commit 0714a4fc1e
No known key found for this signature in database

View File

@ -252,23 +252,8 @@ namespace osu.Game.Rulesets.Osu.Objects
protected void UpdateNestedSamples()
{
HitSampleInfo firstSample = null;
for (int i = 0; i < Samples.Count; i++)
{
// TODO: remove this when guaranteed sort is present for samples (https://github.com/ppy/osu/issues/1933)
if (i == 0)
{
firstSample = Samples[i];
continue;
}
if (Samples[i].Name != HitSampleInfo.HIT_NORMAL)
continue;
firstSample = Samples[i];
break;
}
var firstSample = Samples.FirstOrDefault(s => s.Name == HitSampleInfo.HIT_NORMAL)
?? Samples.FirstOrDefault(); // TODO: remove this when guaranteed sort is present for samples (https://github.com/ppy/osu/issues/1933)
var sampleList = new List<HitSampleInfo>();