1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-06 06:57:39 +08:00

used new slider bonus alg to not overbuff slider jumps

This commit is contained in:
Xexxar 2021-09-26 21:32:36 +00:00
parent 8c6a035369
commit c4430182dd
2 changed files with 15 additions and 4 deletions

View File

@ -31,6 +31,16 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Preprocessing
/// </summary>
public double TravelDistance { get; private set; }
/// <summary>
/// Normalized Vector from the start position of the previous <see cref="OsuDifficultyHitObject"/> to the end position of the previous <see cref="OsuDifficultyHitObject"/>.
/// </summary>
public Vector2 TravelVector { get; private set; }
/// <summary>
/// Milliseconds elapsed since the start time of the previous <see cref="OsuDifficultyHitObject"/>, with a minimum of 50ms.
/// </summary>
public readonly double TravelTime;
/// <summary>
/// Angle the player has to take to hit this <see cref="OsuDifficultyHitObject"/>.
/// Calculated as the angle between the circles (current-2, current-1, current).
@ -71,6 +81,8 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Preprocessing
if (lastObject is Slider lastSlider)
{
computeSliderCursorPosition(lastSlider);
TravelVector = Vector2.Multiply(Vector2.Subtract(lastSlider.TailCircle.Position, lastSlider.HeadCircle.Position), scalingFactor);
TravelDistance = lastSlider.LazyTravelDistance * scalingFactor;
}
@ -104,7 +116,7 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Preprocessing
slider.LazyEndPosition = slider.StackedPosition;
float approxFollowCircleRadius = (float)(slider.Radius * 3);
float approxFollowCircleRadius = (float)(slider.Radius * 2.4);
var computeVertex = new Action<double>(t =>
{
double progress = (t - slider.StartTime) / slider.SpanDuration;

View File

@ -29,8 +29,7 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Skills
private const double wide_angle_multiplier = 1.0;
private const double acute_angle_multiplier = 1.0;
private const double rhythm_variance_multiplier = 1.0;
private const double slider_multiplier = 6.5;
private const double slider_jump_multiplier = 0.875;
private const double slider_multiplier = 4.25;
protected override double StrainValueOf(DifficultyHitObject current)
{
@ -90,7 +89,7 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Skills
if (osuCurrObj.TravelDistance != 0)
{
double sliderBonus = Math.Max(osuCurrObj.TravelDistance, slider_jump_multiplier * Math.Sqrt(osuCurrObj.TravelDistance * osuCurrObj.JumpDistance)) / osuCurrObj.StrainTime;
double sliderBonus = (Math.Max(0, Vector2.Subtract(osuCurrObj.TravelVector, osuCurrObj.JumpVector).Length - osuCurrObj.JumpDistance) + osuCurrObj.TravelDistance) / osuCurrObj.StrainTime;
// Add in slider velocity.
aimStrain += sliderBonus * slider_multiplier;