Calculate spinner ticks as "whole spins" without arbitrary factors

This commit is contained in:
Salman Ahmed 2023-08-27 01:27:19 +03:00
parent e77581f641
commit d614e745b8
1 changed files with 2 additions and 7 deletions

View File

@ -42,15 +42,10 @@ protected override void ApplyDefaultsToSelf(ControlPointInfo controlPointInfo, I
{
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);