1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 18:42:56 +08:00

Merge branch 'master' into fix-replay-time-stop

This commit is contained in:
Dan Balasescu 2018-02-01 20:08:07 +09:00 committed by GitHub
commit 0863326b4c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 4 deletions

View File

@ -23,6 +23,7 @@ namespace osu.Game.Rulesets.Osu.Objects
public double EndTime => StartTime + this.SpanCount() * Curve.Distance / Velocity; public double EndTime => StartTime + this.SpanCount() * Curve.Distance / Velocity;
public double Duration => EndTime - StartTime; public double Duration => EndTime - StartTime;
public Vector2 StackedPositionAt(double t) => this.PositionAt(t) + StackOffset;
public override Vector2 EndPosition => this.PositionAt(1); public override Vector2 EndPosition => this.PositionAt(1);
public SliderCurve Curve { get; } = new SliderCurve(); public SliderCurve Curve { get; } = new SliderCurve();

View File

@ -29,8 +29,7 @@ namespace osu.Game.Rulesets.Osu.OsuDifficulty
protected override void PreprocessHitObjects() protected override void PreprocessHitObjects()
{ {
foreach (OsuHitObject h in Beatmap.HitObjects) new OsuBeatmapProcessor().PostProcess(Beatmap);
(h as Slider)?.Curve?.Calculate();
} }
public override double Calculate(Dictionary<string, double> categoryDifficulty = null) public override double Calculate(Dictionary<string, double> categoryDifficulty = null)

View File

@ -3,7 +3,6 @@
using System; using System;
using System.Linq; using System.Linq;
using osu.Game.Rulesets.Objects.Types;
using OpenTK; using OpenTK;
using osu.Game.Rulesets.Osu.Objects; using osu.Game.Rulesets.Osu.Objects;
@ -95,7 +94,7 @@ namespace osu.Game.Rulesets.Osu.OsuDifficulty.Preprocessing
var computeVertex = new Action<double>(t => var computeVertex = new Action<double>(t =>
{ {
// ReSharper disable once PossibleInvalidOperationException (bugged in current r# version) // ReSharper disable once PossibleInvalidOperationException (bugged in current r# version)
var diff = slider.PositionAt(t) - slider.LazyEndPosition.Value; var diff = slider.StackedPositionAt(t) - slider.LazyEndPosition.Value;
float dist = diff.Length; float dist = diff.Length;
if (dist > approxFollowCircleRadius) if (dist > approxFollowCircleRadius)