Change initialisation of osuSlider

This commit is contained in:
MBmasher 2022-07-18 15:59:00 +10:00
parent 204fbde07b
commit 7c680afc3c
2 changed files with 2 additions and 6 deletions

View File

@ -120,12 +120,10 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Evaluators
velocityChangeBonus *= Math.Pow(Math.Min(osuCurrObj.StrainTime, osuLastObj.StrainTime) / Math.Max(osuCurrObj.StrainTime, osuLastObj.StrainTime), 2);
}
if (osuLastObj.BaseObject is Slider)
if (osuLastObj.BaseObject is Slider osuSlider)
{
// Reward sliders based on velocity.
sliderBonus = osuLastObj.TravelDistance / osuLastObj.TravelTime;
Slider osuSlider = (Slider)(osuLastObj.BaseObject);
sliderBonus *= (float)Math.Pow(1 + osuSlider.RepeatCount / 2.5, 1.0 / 2.5); // Bonus for repeat sliders until a better per nested object strain system can be achieved.
}

View File

@ -80,10 +80,8 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Evaluators
double sliderBonus = 0.0;
if (osuCurrent.BaseObject is Slider)
if (osuCurrent.BaseObject is Slider osuSlider)
{
Slider osuSlider = (Slider)(osuCurrent.BaseObject);
// Invert the scaling factor to determine the true travel distance independent of circle size.
double pixelTravelDistance = osuCurrent.TravelDistance / scalingFactor;