Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add rate adjustment settings for all time mods (DT/HT/NC/DC/WU/WD) #7121

Merged
merged 23 commits into from
Dec 13, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
e375268
Merge remote-tracking branch 'upstream/master' into adjustable-double…
peppy Dec 9, 2019
0c7e5a2
Add bindable adjustments for DT/HT rate
peppy Dec 6, 2019
ba538cf
Merge branch 'apply-to-track' into adjustable-double-time
peppy Dec 9, 2019
9fa745a
Merge branch 'apply-to-track' into adjustable-rate-mods
peppy Dec 9, 2019
6b667da
Update bindable types in line with framework
peppy Dec 9, 2019
7fd52c2
Update mods and user adjust to use adjustments
peppy Dec 9, 2019
edc8220
Add time ramp settings
peppy Dec 9, 2019
12bdb1d
Pin DC/NC pitch
peppy Dec 9, 2019
9eed649
Merge branch 'customized-mods' into adjustable-rate-mods
peppy Dec 11, 2019
b77f950
Merge branch 'master' into adjustable-rate-mods
smoogipoo Dec 11, 2019
404d320
Refactor ModNightcore/ModDaycore
smoogipoo Dec 11, 2019
c34b6b5
Remove time ramp and rate adjust mod incompatibility
smoogipoo Dec 11, 2019
40f918d
Remove unused using
smoogipoo Dec 11, 2019
9961fa7
Merge branch 'master' into adjustable-rate-mods
peppy Dec 12, 2019
4c41992
Use protected constructors
peppy Dec 12, 2019
a0792f8
Re-jig mod select logic to reduce event fires
peppy Dec 12, 2019
c4bc574
Fix test logic and add regression test
peppy Dec 12, 2019
bd3fe23
Merge branch 'fix-mod-retention' into adjustable-rate-mods
peppy Dec 12, 2019
623ab1e
Update time ramp preview on setting change
peppy Dec 12, 2019
af15662
Fix WindUp applying too much change
peppy Dec 12, 2019
72ea871
Make constructor protected
smoogipoo Dec 12, 2019
59538bf
Merge branch 'global-available-mods' into adjustable-rate-mods
peppy Dec 13, 2019
bc397a4
Merge branch 'master' into adjustable-rate-mods
peppy Dec 13, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix WindUp applying too much change
  • Loading branch information
peppy committed Dec 13, 2019
commit af1566285698e8341a998d8d2f8bf7dea65697dd
4 changes: 3 additions & 1 deletion osu.Game/Rulesets/Mods/ModTimeRamp.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ public void ApplyToTrack(Track track)
{
this.track = track;
track.AddAdjustment(AdjustableProperty.Frequency, SpeedChange);

FinalRate.TriggerChange();
}

public virtual void ApplyToBeatmap(IBeatmap beatmap)
Expand All @@ -67,6 +69,6 @@ public virtual void Update(Playfield playfield)
/// </summary>
/// <param name="amount">The amount of adjustment to apply (from 0..1).</param>
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);
}
}
8 changes: 4 additions & 4 deletions osu.Game/Rulesets/Mods/ModWindDown.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ public class ModWindDown : ModTimeRamp
[SettingSource("Final rate", "The speed increase to ramp towards")]
public override BindableNumber<double> FinalRate { get; } = new BindableDouble
{
MinValue = -0.5,
MaxValue = -0.01,
Default = -0.25,
Value = -0.25,
MinValue = 0.5,
MaxValue = 0.99,
Default = 0.75,
Value = 0.75,
Precision = 0.01,
};

Expand Down
2 changes: 1 addition & 1 deletion osu.Game/Rulesets/Mods/ModWindUp.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public class ModWindUp : ModTimeRamp
[SettingSource("Final rate", "The speed increase to ramp towards")]
public override BindableNumber<double> FinalRate { get; } = new BindableDouble
{
MinValue = 0.01,
MinValue = 1.01,
MaxValue = 2,
Default = 1.5,
Value = 1.5,
Expand Down