Treat NaN slider velocity timing points as 1.0x but without slider ticks

This commit is contained in:
Khang
2022-08-22 21:44:25 -04:00
parent e8d4bc4497
commit 9f08c474ca
9 changed files with 57 additions and 23 deletions

View File

@ -142,6 +142,11 @@ namespace osu.Game.Rulesets.Osu.Objects
/// </summary>
public double TickDistanceMultiplier = 1;
/// <summary>
/// Whether this <see cref="Slider"/> should generate <see cref="SliderTick"/>s.
/// </summary>
public bool GenerateTicks { get; private set; }
/// <summary>
/// Whether this <see cref="Slider"/>'s judgement is fully handled by its nested <see cref="HitObject"/>s.
/// If <c>false</c>, this <see cref="Slider"/> will be judged proportionally to the number of nested <see cref="HitObject"/>s hit.
@ -170,13 +175,14 @@ namespace osu.Game.Rulesets.Osu.Objects
Velocity = scoringDistance / timingPoint.BeatLength;
TickDistance = scoringDistance / difficulty.SliderTickRate * TickDistanceMultiplier;
GenerateTicks = DifficultyControlPoint.GenerateTicks;
}
protected override void CreateNestedHitObjects(CancellationToken cancellationToken)
{
base.CreateNestedHitObjects(cancellationToken);
var sliderEvents = SliderEventGenerator.Generate(StartTime, SpanDuration, Velocity, TickDistance, Path.Distance, this.SpanCount(), LegacyLastTickOffset, cancellationToken);
var sliderEvents = SliderEventGenerator.Generate(StartTime, SpanDuration, Velocity, TickDistance, Path.Distance, this.SpanCount(), LegacyLastTickOffset, GenerateTicks, cancellationToken);
foreach (var e in sliderEvents)
{