diff --git a/osu.Game.Rulesets.Mania/Timing/Drawables/DrawableGravityTimingChange.cs b/osu.Game.Rulesets.Mania/Timing/Drawables/DrawableGravityTimingChange.cs index 9372950855..d5bfab9723 100644 --- a/osu.Game.Rulesets.Mania/Timing/Drawables/DrawableGravityTimingChange.cs +++ b/osu.Game.Rulesets.Mania/Timing/Drawables/DrawableGravityTimingChange.cs @@ -8,12 +8,6 @@ namespace osu.Game.Rulesets.Mania.Timing.Drawables { public class DrawableGravityTimingChange : DrawableTimingChange { - // Amount of time to travel this container such that - // at time = 0, gravityTime = timeSpan and - // at time = travel_time, gravityTime = 0 - // Where gravityTime is used as the position of the content - private const double travel_time = 1000; - public DrawableGravityTimingChange(TimingChange timingChange) : base(timingChange) { @@ -44,7 +38,7 @@ namespace osu.Game.Rulesets.Mania.Timing.Drawables // The sign of the relative time, this is used to apply backwards acceleration leading into startTime double sign = relativeTime < 0 ? -1 : 1; - return timeSpan - acceleration / 2 * relativeTime * relativeTime * sign; + return timeSpan - acceleration * relativeTime * relativeTime * sign; } /// @@ -55,20 +49,18 @@ namespace osu.Game.Rulesets.Mania.Timing.Drawables /// /// The acceleration due to "gravity" of the content of this container. /// - private double acceleration => 2 * timeSpan / travel_time / travel_time; + private double acceleration => timeSpan / travelTime / travelTime; /// - /// Computes the current time relative to , accounting for . + /// The travel time, after beat length adjustments. /// - /// The non-offset time. - /// The current time relative to - . - private double relativeTimeAt(double time) => Time.Current - time + travel_time; + private double travelTime => timeSpan / TimingChange.SpeedMultiplier; /// - /// The velocity of the content of this container at a time. + /// Computes the current time relative to , accounting for . /// /// The non-offset time. - /// The velocity at . - private double velocityAt(double time) => acceleration * relativeTimeAt(time); + /// The current time relative to - . + private double relativeTimeAt(double time) => Time.Current - time + travelTime; } } \ No newline at end of file