mirror of https://github.com/ppy/osu
fixed sample control point applying
This commit is contained in:
parent
5accb05f45
commit
1b4f4372d5
|
@ -118,10 +118,7 @@ private void applyLegacyInfoAndDefaults(HitObject hitObject)
|
|||
|
||||
SampleControlPoint sampleControlPoint = legacyInfo != null ? legacyInfo.SamplePointAt(hitObject.GetEndTime() + control_point_leniency) : SampleControlPoint.DEFAULT;
|
||||
|
||||
foreach (var hitSampleInfo in hitObject.Samples)
|
||||
{
|
||||
sampleControlPoint.ApplyTo(hitSampleInfo);
|
||||
}
|
||||
hitObject.Samples = hitObject.Samples.Select(o => sampleControlPoint.ApplyTo(o)).ToList();
|
||||
|
||||
if (hitObject is not IHasRepeats hasRepeats) return;
|
||||
|
||||
|
@ -130,10 +127,7 @@ private void applyLegacyInfoAndDefaults(HitObject hitObject)
|
|||
double time = hitObject.StartTime + i * hasRepeats.Duration / hasRepeats.SpanCount() + control_point_leniency;
|
||||
sampleControlPoint = legacyInfo != null ? legacyInfo.SamplePointAt(time) : SampleControlPoint.DEFAULT;
|
||||
|
||||
foreach (var hitSampleInfo in hasRepeats.NodeSamples[i])
|
||||
{
|
||||
sampleControlPoint.ApplyTo(hitSampleInfo);
|
||||
}
|
||||
hasRepeats.NodeSamples[i] = hasRepeats.NodeSamples[i].Select(o => sampleControlPoint.ApplyTo(o)).ToList();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue