diff --git a/osu.Game/Rulesets/Mods/ModTimeRamp.cs b/osu.Game/Rulesets/Mods/ModTimeRamp.cs index d21990ae91..a9330f9287 100644 --- a/osu.Game/Rulesets/Mods/ModTimeRamp.cs +++ b/osu.Game/Rulesets/Mods/ModTimeRamp.cs @@ -20,12 +20,12 @@ namespace osu.Game.Rulesets.Mods /// private const double final_rate_progress = 0.75f; + [SettingSource("Initial rate", "The starting speed of the track")] + public abstract BindableNumber InitialRate { get; } + [SettingSource("Final rate", "The final speed to ramp to")] public abstract BindableNumber FinalRate { get; } - [SettingSource("Start wounded", "Start at 100% of the final rate")] - public BindableBool Reverse { get; } = new BindableBool(); - private double finalRateTime; private double beginRampTime; @@ -64,10 +64,7 @@ namespace osu.Game.Rulesets.Mods public virtual void Update(Playfield playfield) { - if (!Reverse.Value) - applyAdjustment((track.CurrentTime - beginRampTime) / finalRateTime); - else - applyAdjustment(1 - ((track.CurrentTime - beginRampTime) / finalRateTime)); + applyAdjustment((track.CurrentTime - beginRampTime) / finalRateTime); } /// @@ -75,6 +72,7 @@ namespace osu.Game.Rulesets.Mods /// /// The amount of adjustment to apply (from 0..1). private void applyAdjustment(double amount) => - SpeedChange.Value = 1 + (FinalRate.Value - 1) * Math.Clamp(amount, 0, 1); + // SpeedChange.Value = 1 + (FinalRate.Value - 1) * Math.Clamp(amount, 0, 1); + SpeedChange.Value = InitialRate.Value + (FinalRate.Value - InitialRate.Value) * Math.Clamp(amount, 0, 1); } } diff --git a/osu.Game/Rulesets/Mods/ModWindDown.cs b/osu.Game/Rulesets/Mods/ModWindDown.cs index da3bd75b44..939766fee5 100644 --- a/osu.Game/Rulesets/Mods/ModWindDown.cs +++ b/osu.Game/Rulesets/Mods/ModWindDown.cs @@ -17,6 +17,16 @@ namespace osu.Game.Rulesets.Mods public override IconUsage? Icon => FontAwesome.Solid.ChevronCircleDown; public override double ScoreMultiplier => 1.0; + [SettingSource("Initial rate", "The starting speed of the track")] + public override BindableNumber InitialRate { get; } = new BindableDouble + { + MinValue = 1, + MaxValue = 1.5, + Default = 1, + Value = 1, + Precision = 0.01, + }; + [SettingSource("Final rate", "The speed increase to ramp towards")] public override BindableNumber FinalRate { get; } = new BindableDouble { diff --git a/osu.Game/Rulesets/Mods/ModWindUp.cs b/osu.Game/Rulesets/Mods/ModWindUp.cs index 3f456a42a5..74c6fc22d3 100644 --- a/osu.Game/Rulesets/Mods/ModWindUp.cs +++ b/osu.Game/Rulesets/Mods/ModWindUp.cs @@ -17,6 +17,16 @@ namespace osu.Game.Rulesets.Mods public override IconUsage? Icon => FontAwesome.Solid.ChevronCircleUp; public override double ScoreMultiplier => 1.0; + [SettingSource("Initial rate", "The starting speed of the track")] + public override BindableNumber InitialRate { get; } = new BindableDouble + { + MinValue = 0.5, + MaxValue = 1, + Default = 1, + Value = 1, + Precision = 0.01, + }; + [SettingSource("Final rate", "The speed increase to ramp towards")] public override BindableNumber FinalRate { get; } = new BindableDouble {