mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 14:32:55 +08:00
updated sliders to handle increased tick rates better
This commit is contained in:
parent
626db1f274
commit
7eb7d12589
@ -91,26 +91,39 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Preprocessing
|
||||
MovementTime = Math.Max(StrainTime - lastSlider.LazyTravelTime / clockRate, min_delta_time);
|
||||
MovementDistance = Vector2.Subtract(lastSlider.TailCircle.StackedPosition, BaseObject.StackedPosition).Length * scalingFactor;
|
||||
|
||||
int repeatCount = 0;
|
||||
|
||||
for (int i = 1; i < lastSlider.NestedHitObjects.Count; i++)
|
||||
{
|
||||
Vector2 currSlider = Vector2.Subtract(((OsuHitObject)lastSlider.NestedHitObjects[i]).StackedPosition, ((OsuHitObject)lastSlider.NestedHitObjects[i - 1]).StackedPosition);
|
||||
|
||||
if ((OsuHitObject)lastSlider.NestedHitObjects[i] is SliderRepeat)
|
||||
TravelDistance += Math.Max(0, currSlider.Length * scalingFactor - 100); // remove 100 distance to avoid buffing overlapping followcircles.
|
||||
if ((OsuHitObject)lastSlider.NestedHitObjects[i] is SliderRepeat && (OsuHitObject)lastSlider.NestedHitObjects[i - 1] is SliderRepeat)
|
||||
{
|
||||
repeatCount++;
|
||||
TravelDistance += Math.Max(0, currSlider.Length * scalingFactor - 240); // remove 240 distance to avoid buffing overlapping followcircles.
|
||||
}
|
||||
else if ((OsuHitObject)lastSlider.NestedHitObjects[i] is SliderRepeat)
|
||||
{
|
||||
repeatCount++;
|
||||
TravelDistance += Math.Max(0, currSlider.Length * scalingFactor - 120); // remove 120 distance to avoid buffing overlapping followcircles.
|
||||
}
|
||||
else if ((OsuHitObject)lastSlider.NestedHitObjects[i] is SliderEndCircle)
|
||||
{
|
||||
Vector2 possSlider = Vector2.Subtract((Vector2)lastSlider.LazyEndPosition, ((OsuHitObject)lastSlider.NestedHitObjects[i - 1]).StackedPosition);
|
||||
TravelDistance += Math.Min(possSlider.Length, currSlider.Length) * scalingFactor; // Take the least distance from slider end vs lazy end.
|
||||
}
|
||||
else
|
||||
TravelDistance += Vector2.Subtract(((OsuHitObject)lastSlider.NestedHitObjects[i]).StackedPosition, ((OsuHitObject)lastSlider.NestedHitObjects[i - 1]).StackedPosition).Length * scalingFactor;
|
||||
|
||||
if ((OsuHitObject)lastSlider.NestedHitObjects[i] is SliderTick && i != lastSlider.NestedHitObjects.Count - 1) // Check for tick && not last object is necessary for 2007 bugged sliders.
|
||||
{
|
||||
Vector2 nextSlider = Vector2.Subtract(((OsuHitObject)lastSlider.NestedHitObjects[i + 1]).StackedPosition, ((OsuHitObject)lastSlider.NestedHitObjects[i]).StackedPosition);
|
||||
TravelDistance += Math.Max(0, Vector2.Subtract(nextSlider, currSlider).Length - Math.Max(nextSlider.Length, currSlider.Length)) * scalingFactor; // bonus for ticks where angles are less than 120 degrees.
|
||||
}
|
||||
TravelDistance += Math.Max(0, currSlider.Length * scalingFactor - 100); // remove 100 distance to avoid buffing overlapping ticks, mostly needed to prevent buffing slow sliders with high tick rate.
|
||||
}
|
||||
|
||||
if (repeatCount == 0)
|
||||
{
|
||||
TravelDistance = Math.Max(TravelDistance, scalingFactor * // idea here is to prevent ticks from dropping difficulty of slider by removing distance in calculation.
|
||||
Math.Min(Vector2.Subtract(((OsuHitObject)lastSlider.NestedHitObjects[lastSlider.NestedHitObjects.Count - 1]).StackedPosition, ((OsuHitObject)lastSlider.NestedHitObjects[0]).StackedPosition).Length,
|
||||
Vector2.Subtract((Vector2)lastSlider.LazyEndPosition, ((OsuHitObject)lastSlider.NestedHitObjects[0]).StackedPosition).Length));
|
||||
}
|
||||
else
|
||||
TravelDistance *= Math.Pow(1 + repeatCount / 2.0, 1.0 / 2.0); // Bonus for repeat sliders until a better per nested object strain system can be achieved.
|
||||
}
|
||||
|
||||
Vector2 lastCursorPosition = getEndCursorPosition(lastObject);
|
||||
|
@ -24,7 +24,7 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Skills
|
||||
|
||||
private const double wide_angle_multiplier = 1.5;
|
||||
private const double acute_angle_multiplier = 2.0;
|
||||
private const double slider_multiplier = 1.75;
|
||||
private const double slider_multiplier = 1.5;
|
||||
|
||||
private double currentStrain = 1;
|
||||
|
||||
@ -67,7 +67,7 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Skills
|
||||
|
||||
if (Precision.AlmostEquals(osuCurrObj.StrainTime, osuPrevObj.StrainTime, 10)) // If rhythms are the same.
|
||||
{
|
||||
if (osuCurrObj.Angle != null && osuPrevObj.Angle != null)
|
||||
if (osuCurrObj.Angle != null && osuPrevObj.Angle != null && osuLastObj.Angle != null)
|
||||
{
|
||||
double currAngle = osuCurrObj.Angle.Value;
|
||||
double prevAngle = osuPrevObj.Angle.Value;
|
||||
|
Loading…
Reference in New Issue
Block a user