mirror of https://github.com/ppy/osu
Actually use whistle sample for sliderwhistle
This commit is contained in:
parent
7e1739812d
commit
8efa381d3a
|
@ -111,17 +111,17 @@ protected override void LoadSamples()
|
|||
{
|
||||
base.LoadSamples();
|
||||
|
||||
var firstSample = HitObject.OriginalSamples.FirstOrDefault();
|
||||
var slidingSamples = new List<ISampleInfo>();
|
||||
|
||||
if (firstSample != null)
|
||||
{
|
||||
var samples = new List<ISampleInfo> { HitObject.SampleControlPoint.ApplyTo(firstSample).With("sliderslide") };
|
||||
var normalSample = HitObject.OriginalSamples.FirstOrDefault(s => s.Name == HitSampleInfo.HIT_NORMAL);
|
||||
if (normalSample != null)
|
||||
slidingSamples.Add(HitObject.SampleControlPoint.ApplyTo(normalSample).With("sliderslide"));
|
||||
|
||||
if (HitObject.OriginalSamples.Any(s => s.Name == HitSampleInfo.HIT_WHISTLE))
|
||||
samples.Add(HitObject.SampleControlPoint.ApplyTo(firstSample).With("sliderwhistle"));
|
||||
var whistleSample = HitObject.OriginalSamples.FirstOrDefault(s => s.Name == HitSampleInfo.HIT_WHISTLE);
|
||||
if (whistleSample != null)
|
||||
slidingSamples.Add(HitObject.SampleControlPoint.ApplyTo(whistleSample).With("sliderwhistle"));
|
||||
|
||||
slidingSample.Samples = samples.ToArray();
|
||||
}
|
||||
slidingSample.Samples = slidingSamples.ToArray();
|
||||
}
|
||||
|
||||
public override void StopAllSamples()
|
||||
|
|
Loading…
Reference in New Issue