mirror of
https://github.com/ppy/osu.git
synced 2025-02-05 04:52:53 +08:00
Fix WindUp applying too much change
This commit is contained in:
parent
623ab1ef3b
commit
af15662856
@ -45,6 +45,8 @@ namespace osu.Game.Rulesets.Mods
|
|||||||
{
|
{
|
||||||
this.track = track;
|
this.track = track;
|
||||||
track.AddAdjustment(AdjustableProperty.Frequency, SpeedChange);
|
track.AddAdjustment(AdjustableProperty.Frequency, SpeedChange);
|
||||||
|
|
||||||
|
FinalRate.TriggerChange();
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual void ApplyToBeatmap(IBeatmap beatmap)
|
public virtual void ApplyToBeatmap(IBeatmap beatmap)
|
||||||
@ -67,6 +69,6 @@ namespace osu.Game.Rulesets.Mods
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="amount">The amount of adjustment to apply (from 0..1).</param>
|
/// <param name="amount">The amount of adjustment to apply (from 0..1).</param>
|
||||||
private void applyAdjustment(double amount) =>
|
private void applyAdjustment(double amount) =>
|
||||||
SpeedChange.Value = 1 + (Math.Sign(FinalRate.Value) * Math.Clamp(amount, 0, 1) * Math.Abs(FinalRate.Value));
|
SpeedChange.Value = 1 + (FinalRate.Value - 1) * Math.Clamp(amount, 0, 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -20,10 +20,10 @@ namespace osu.Game.Rulesets.Mods
|
|||||||
[SettingSource("Final rate", "The speed increase to ramp towards")]
|
[SettingSource("Final rate", "The speed increase to ramp towards")]
|
||||||
public override BindableNumber<double> FinalRate { get; } = new BindableDouble
|
public override BindableNumber<double> FinalRate { get; } = new BindableDouble
|
||||||
{
|
{
|
||||||
MinValue = -0.5,
|
MinValue = 0.5,
|
||||||
MaxValue = -0.01,
|
MaxValue = 0.99,
|
||||||
Default = -0.25,
|
Default = 0.75,
|
||||||
Value = -0.25,
|
Value = 0.75,
|
||||||
Precision = 0.01,
|
Precision = 0.01,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ namespace osu.Game.Rulesets.Mods
|
|||||||
[SettingSource("Final rate", "The speed increase to ramp towards")]
|
[SettingSource("Final rate", "The speed increase to ramp towards")]
|
||||||
public override BindableNumber<double> FinalRate { get; } = new BindableDouble
|
public override BindableNumber<double> FinalRate { get; } = new BindableDouble
|
||||||
{
|
{
|
||||||
MinValue = 0.01,
|
MinValue = 1.01,
|
||||||
MaxValue = 2,
|
MaxValue = 2,
|
||||||
Default = 1.5,
|
Default = 1.5,
|
||||||
Value = 1.5,
|
Value = 1.5,
|
||||||
|
Loading…
Reference in New Issue
Block a user