mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 07:42:57 +08:00
Use latest slider velocity for juice stream velocity computation.
This fixes one-frame glitch in editor when slider velocity is changed.
This commit is contained in:
parent
0e98bb28bd
commit
670922c8e5
@ -27,10 +27,16 @@ namespace osu.Game.Rulesets.Catch.Objects
|
|||||||
public int RepeatCount { get; set; }
|
public int RepeatCount { get; set; }
|
||||||
|
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
public double Velocity { get; private set; }
|
private double velocityFactor;
|
||||||
|
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
public double TickDistance { get; private set; }
|
private double tickDistanceFactor;
|
||||||
|
|
||||||
|
[JsonIgnore]
|
||||||
|
public double Velocity => velocityFactor * DifficultyControlPoint.SliderVelocity;
|
||||||
|
|
||||||
|
[JsonIgnore]
|
||||||
|
public double TickDistance => tickDistanceFactor * DifficultyControlPoint.SliderVelocity;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The length of one span of this <see cref="JuiceStream"/>.
|
/// The length of one span of this <see cref="JuiceStream"/>.
|
||||||
@ -43,10 +49,8 @@ namespace osu.Game.Rulesets.Catch.Objects
|
|||||||
|
|
||||||
TimingControlPoint timingPoint = controlPointInfo.TimingPointAt(StartTime);
|
TimingControlPoint timingPoint = controlPointInfo.TimingPointAt(StartTime);
|
||||||
|
|
||||||
double scoringDistance = base_scoring_distance * difficulty.SliderMultiplier * DifficultyControlPoint.SliderVelocity;
|
velocityFactor = base_scoring_distance * difficulty.SliderMultiplier / timingPoint.BeatLength;
|
||||||
|
tickDistanceFactor = base_scoring_distance * difficulty.SliderMultiplier / difficulty.SliderTickRate;
|
||||||
Velocity = scoringDistance / timingPoint.BeatLength;
|
|
||||||
TickDistance = scoringDistance / difficulty.SliderTickRate;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void CreateNestedHitObjects(CancellationToken cancellationToken)
|
protected override void CreateNestedHitObjects(CancellationToken cancellationToken)
|
||||||
|
Loading…
Reference in New Issue
Block a user