remove other usages of hitobject SampleControlPoint

This commit is contained in:
OliBomby
2023-04-25 16:01:43 +02:00
parent a634617157
commit ebe1d852f5
5 changed files with 7 additions and 14 deletions

View File

@ -357,13 +357,7 @@ namespace osu.Game.Rulesets.Objects.Drawables
if (samples.Length <= 0)
return;
if (HitObject.SampleControlPoint == null)
{
throw new InvalidOperationException($"{nameof(HitObject)}s must always have an attached {nameof(HitObject.SampleControlPoint)}."
+ $" This is an indication that {nameof(HitObject.ApplyDefaults)} has not been invoked on {this}.");
}
Samples.Samples = samples.Select(s => HitObject.SampleControlPoint.ApplyTo(s)).Cast<ISampleInfo>().ToArray();
Samples.Samples = samples.Cast<ISampleInfo>().ToArray();
}
private void onSamplesChanged(object sender, NotifyCollectionChangedEventArgs e) => LoadSamples();