Fix touch device difficulty reduction not affecting star rating

This commit is contained in:
StanR 2022-01-19 22:31:11 +03:00
parent 4b127d5029
commit b77e6f92b7
2 changed files with 5 additions and 6 deletions

View File

@ -40,6 +40,9 @@ protected override DifficultyAttributes CreateDifficultyAttributes(IBeatmap beat
double sliderFactor = aimRating > 0 ? aimRatingNoSliders / aimRating : 1;
if (mods.Any(m => m is OsuModTouchDevice))
aimRating = Math.Pow(aimRating, 0.8);
if (mods.Any(h => h is OsuModRelax))
speedRating = 0.0;
@ -120,6 +123,7 @@ protected override Skill[] CreateSkills(IBeatmap beatmap, Mod[] mods, double clo
protected override Mod[] DifficultyAdjustmentMods => new Mod[]
{
new OsuModTouchDevice(),
new OsuModDoubleTime(),
new OsuModHalfTime(),
new OsuModEasy(),

View File

@ -84,12 +84,7 @@ public override PerformanceAttributes Calculate()
private double computeAimValue()
{
double rawAim = Attributes.AimDifficulty;
if (mods.Any(m => m is OsuModTouchDevice))
rawAim = Math.Pow(rawAim, 0.8);
double aimValue = Math.Pow(5.0 * Math.Max(1.0, rawAim / 0.0675) - 4.0, 3.0) / 100000.0;
double aimValue = Math.Pow(5.0 * Math.Max(1.0, Attributes.AimDifficulty / 0.0675) - 4.0, 3.0) / 100000.0;
double lengthBonus = 0.95 + 0.4 * Math.Min(1.0, totalHits / 2000.0) +
(totalHits > 2000 ? Math.Log10(totalHits / 2000.0) * 0.5 : 0.0);