mirror of
https://github.com/osukey/osukey.git
synced 2025-08-04 23:24:04 +09:00
Fix osu star rating calculation
The main bug was that the beatmap was not being processed prior to having its Skill values calculated, causing stacking to be ignored in difficulty calculation. The fix involves processing the beatmap with OsuBeatmapProcessor. Another minor bug was that sliders were not taking into account the stacked position midway through the slider (PositionAt does not return stacked position.), so I corrected by adding StackOffset.
This commit is contained in:
@ -29,8 +29,7 @@ namespace osu.Game.Rulesets.Osu.OsuDifficulty
|
||||
|
||||
protected override void PreprocessHitObjects()
|
||||
{
|
||||
foreach (OsuHitObject h in Beatmap.HitObjects)
|
||||
(h as Slider)?.Curve?.Calculate();
|
||||
new OsuBeatmapProcessor().PostProcess(Beatmap);
|
||||
}
|
||||
|
||||
public override double Calculate(Dictionary<string, double> categoryDifficulty = null)
|
||||
|
@ -95,7 +95,7 @@ namespace osu.Game.Rulesets.Osu.OsuDifficulty.Preprocessing
|
||||
var computeVertex = new Action<double>(t =>
|
||||
{
|
||||
// ReSharper disable once PossibleInvalidOperationException (bugged in current r# version)
|
||||
var diff = slider.PositionAt(t) - slider.LazyEndPosition.Value;
|
||||
var diff = slider.PositionAt(t) + slider.StackOffset - slider.LazyEndPosition.Value;
|
||||
float dist = diff.Length;
|
||||
|
||||
if (dist > approxFollowCircleRadius)
|
||||
|
Reference in New Issue
Block a user