mirror of
https://github.com/ppy/osu.git
synced 2025-01-30 06:12:58 +08:00
Fix incorrect controlpoint being applied to samples
This commit is contained in:
parent
8f1d53400e
commit
eb88768bd0
@ -295,6 +295,9 @@ namespace osu.Game.Tests.Beatmaps.Formats
|
|||||||
Assert.AreEqual("normal-hitnormal", getTestableSampleInfo(hitObjects[1]).LookupNames.First());
|
Assert.AreEqual("normal-hitnormal", getTestableSampleInfo(hitObjects[1]).LookupNames.First());
|
||||||
Assert.AreEqual("normal-hitnormal2", getTestableSampleInfo(hitObjects[2]).LookupNames.First());
|
Assert.AreEqual("normal-hitnormal2", getTestableSampleInfo(hitObjects[2]).LookupNames.First());
|
||||||
Assert.AreEqual("normal-hitnormal", getTestableSampleInfo(hitObjects[3]).LookupNames.First());
|
Assert.AreEqual("normal-hitnormal", getTestableSampleInfo(hitObjects[3]).LookupNames.First());
|
||||||
|
|
||||||
|
// The control point at the end time of the slider should be applied
|
||||||
|
Assert.AreEqual("soft-hitnormal8", getTestableSampleInfo(hitObjects[4]).LookupNames.First());
|
||||||
}
|
}
|
||||||
|
|
||||||
SampleInfo getTestableSampleInfo(HitObject hitObject) => hitObject.SampleControlPoint.ApplyTo(hitObject.Samples[0]);
|
SampleInfo getTestableSampleInfo(HitObject hitObject) => hitObject.SampleControlPoint.ApplyTo(hitObject.Samples[0]);
|
||||||
|
@ -8,9 +8,12 @@ SampleSet: Normal
|
|||||||
2638,-100,4,1,1,40,0,0
|
2638,-100,4,1,1,40,0,0
|
||||||
3107,-100,4,1,2,40,0,0
|
3107,-100,4,1,2,40,0,0
|
||||||
3576,-100,4,1,0,40,0,0
|
3576,-100,4,1,0,40,0,0
|
||||||
|
18287,-100,4,2,11,80,0,1
|
||||||
|
18595,-100,4,2,8,80,0,1
|
||||||
|
|
||||||
[HitObjects]
|
[HitObjects]
|
||||||
255,193,2170,1,0,0:0:0:0:
|
255,193,2170,1,0,0:0:0:0:
|
||||||
256,191,2638,5,0,0:0:0:0:
|
256,191,2638,5,0,0:0:0:0:
|
||||||
255,193,3107,1,0,0:0:0:0:
|
255,193,3107,1,0,0:0:0:0:
|
||||||
256,191,3576,1,0,0:0:0:0:
|
256,191,3576,1,0,0:0:0:0:
|
||||||
|
112,200,18493,6,0,L|104:248,1,35,8|0,0:0|0:0,0:0:0:0:
|
@ -147,6 +147,7 @@ namespace osu.Game.Rulesets.Objects.Drawables
|
|||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Plays all the hit sounds for this <see cref="DrawableHitObject"/>.
|
/// Plays all the hit sounds for this <see cref="DrawableHitObject"/>.
|
||||||
|
/// This is invoked automatically when this <see cref="DrawableHitObject"/> is hit.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void PlaySamples() => Samples?.Play();
|
public void PlaySamples() => Samples?.Play();
|
||||||
|
|
||||||
|
@ -69,6 +69,9 @@ namespace osu.Game.Rulesets.Objects
|
|||||||
{
|
{
|
||||||
ApplyDefaultsToSelf(controlPointInfo, difficulty);
|
ApplyDefaultsToSelf(controlPointInfo, difficulty);
|
||||||
|
|
||||||
|
// This is done here since ApplyDefaultsToSelf may be used to determine the end time
|
||||||
|
SampleControlPoint = controlPointInfo.SamplePointAt((this as IHasEndTime)?.EndTime ?? StartTime);
|
||||||
|
|
||||||
nestedHitObjects.Clear();
|
nestedHitObjects.Clear();
|
||||||
|
|
||||||
CreateNestedHitObjects();
|
CreateNestedHitObjects();
|
||||||
@ -84,11 +87,7 @@ namespace osu.Game.Rulesets.Objects
|
|||||||
|
|
||||||
protected virtual void ApplyDefaultsToSelf(ControlPointInfo controlPointInfo, BeatmapDifficulty difficulty)
|
protected virtual void ApplyDefaultsToSelf(ControlPointInfo controlPointInfo, BeatmapDifficulty difficulty)
|
||||||
{
|
{
|
||||||
SampleControlPoint samplePoint = controlPointInfo.SamplePointAt(StartTime);
|
Kiai = controlPointInfo.EffectPointAt(StartTime).KiaiMode;
|
||||||
EffectControlPoint effectPoint = controlPointInfo.EffectPointAt(StartTime);
|
|
||||||
|
|
||||||
Kiai = effectPoint.KiaiMode;
|
|
||||||
SampleControlPoint = samplePoint;
|
|
||||||
|
|
||||||
if (HitWindows == null)
|
if (HitWindows == null)
|
||||||
HitWindows = CreateHitWindows();
|
HitWindows = CreateHitWindows();
|
||||||
|
Loading…
Reference in New Issue
Block a user