diff --git a/osu.Game.Modes.Osu/Objects/Slider.cs b/osu.Game.Modes.Osu/Objects/Slider.cs index daf4fd7138..819e227606 100644 --- a/osu.Game.Modes.Osu/Objects/Slider.cs +++ b/osu.Game.Modes.Osu/Objects/Slider.cs @@ -57,10 +57,10 @@ namespace osu.Game.Modes.Osu.Objects ControlPoint overridePoint; ControlPoint timingPoint = beatmap.TimingPointAt(StartTime, out overridePoint); var velocityAdjustment = overridePoint?.VelocityAdjustment ?? 1; - var baseVelocity = 100 * baseDifficulty.SliderMultiplier; + var baseVelocity = 100 * baseDifficulty.SliderMultiplier / velocityAdjustment; - Velocity = baseVelocity / ((timingPoint?.BeatLength ?? 500) * velocityAdjustment); - TickDistance = baseVelocity / (baseDifficulty.SliderTickRate * velocityAdjustment); + Velocity = baseVelocity / timingPoint.BeatLength; + TickDistance = baseVelocity / baseDifficulty.SliderTickRate; } public int RepeatCount = 1; diff --git a/osu.Game/Beatmaps/Beatmap.cs b/osu.Game/Beatmaps/Beatmap.cs index f9bc865860..a55e9fa80d 100644 --- a/osu.Game/Beatmaps/Beatmap.cs +++ b/osu.Game/Beatmaps/Beatmap.cs @@ -55,7 +55,7 @@ namespace osu.Game.Beatmaps else break; } - return timingPoint; + return timingPoint ?? ControlPoint.Default; } } } diff --git a/osu.Game/Beatmaps/Timing/ControlPoint.cs b/osu.Game/Beatmaps/Timing/ControlPoint.cs index 27cc7244fb..88e2c2d0f4 100644 --- a/osu.Game/Beatmaps/Timing/ControlPoint.cs +++ b/osu.Game/Beatmaps/Timing/ControlPoint.cs @@ -1,20 +1,21 @@ // Copyright (c) 2007-2017 ppy Pty Ltd . // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - namespace osu.Game.Beatmaps.Timing { public class ControlPoint { + public static ControlPoint Default = new ControlPoint + { + BeatLength = 500, + TimingChange = true, + }; + public double Time; public double BeatLength; public double VelocityAdjustment; public bool TimingChange; + } internal enum TimeSignatures