mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 10:52:53 +08: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:
parent
08ffd886e3
commit
b04e2cbb5c
@ -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)
|
||||
|
@ -19,7 +19,7 @@ namespace osu.Game.Beatmaps
|
||||
|
||||
public abstract class DifficultyCalculator<T> : DifficultyCalculator where T : HitObject
|
||||
{
|
||||
protected readonly Beatmap<T> Beatmap;
|
||||
protected Beatmap<T> Beatmap;
|
||||
protected readonly Mod[] Mods;
|
||||
|
||||
protected DifficultyCalculator(Beatmap beatmap, Mod[] mods = null)
|
||||
|
Loading…
Reference in New Issue
Block a user