1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-21 22:47:24 +08:00

Merge pull request #24661 from frenzibyte/stable-spinner-ticks-1

Update osu! spinner ticks calculation method to better match with osu!(stable)
This commit is contained in:
Dean Herbert 2023-09-12 20:41:28 +09:00 committed by GitHub
commit 7db4b3e83c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 12 deletions

View File

@ -286,7 +286,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
private static readonly int score_per_tick = new SpinnerBonusTick.OsuSpinnerBonusTickJudgement().MaxNumericResult;
private int wholeSpins;
private int completedFullSpins;
private void updateBonusScore()
{
@ -295,14 +295,14 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
int spins = (int)(Result.RateAdjustedRotation / 360);
if (spins < wholeSpins)
if (spins < completedFullSpins)
{
// rewinding, silently handle
wholeSpins = spins;
completedFullSpins = spins;
return;
}
while (wholeSpins != spins)
while (completedFullSpins != spins)
{
var tick = ticks.FirstOrDefault(t => !t.Result.HasResult);
@ -315,7 +315,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
gainedBonus.Value = score_per_tick * (spins - HitObject.SpinsRequired);
}
wholeSpins++;
completedFullSpins++;
}
}
}

View File

@ -42,15 +42,10 @@ namespace osu.Game.Rulesets.Osu.Objects
{
base.ApplyDefaultsToSelf(controlPointInfo, difficulty);
// spinning doesn't match 1:1 with stable, so let's fudge them easier for the time being.
const double stable_matching_fudge = 0.6;
// close to 477rpm
const double maximum_rotations_per_second = 8;
const double maximum_rotations_per_second = 477f / 60f;
double secondsDuration = Duration / 1000;
double minimumRotationsPerSecond = stable_matching_fudge * IBeatmapDifficultyInfo.DifficultyRange(difficulty.OverallDifficulty, 3, 5, 7.5);
double minimumRotationsPerSecond = IBeatmapDifficultyInfo.DifficultyRange(difficulty.OverallDifficulty, 1.5, 2.5, 3.75);
SpinsRequired = (int)(secondsDuration * minimumRotationsPerSecond);
MaximumBonusSpins = (int)((maximum_rotations_per_second - minimumRotationsPerSecond) * secondsDuration);