mirror of https://github.com/ppy/osu
Change rate correction logic to be more explicit
This commit is contained in:
parent
f6d3cd6413
commit
73d6a3687e
|
@ -49,10 +49,16 @@ public class ModWindDown : ModTimeRamp
|
|||
public ModWindDown()
|
||||
{
|
||||
InitialRate.BindValueChanged(val =>
|
||||
FinalRate.Value = Math.Min(FinalRate.Value, val.NewValue - FinalRate.Precision));
|
||||
{
|
||||
if (val.NewValue <= FinalRate.Value)
|
||||
FinalRate.Value = val.NewValue - FinalRate.Precision;
|
||||
});
|
||||
|
||||
FinalRate.BindValueChanged(val =>
|
||||
InitialRate.Value = Math.Max(InitialRate.Value, val.NewValue + InitialRate.Precision));
|
||||
{
|
||||
if (val.NewValue >= InitialRate.Value)
|
||||
InitialRate.Value = val.NewValue + FinalRate.Precision;
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -49,10 +49,16 @@ public class ModWindUp : ModTimeRamp
|
|||
public ModWindUp()
|
||||
{
|
||||
InitialRate.BindValueChanged(val =>
|
||||
FinalRate.Value = Math.Max(FinalRate.Value, val.NewValue + FinalRate.Precision));
|
||||
{
|
||||
if (val.NewValue >= FinalRate.Value)
|
||||
FinalRate.Value = val.NewValue + FinalRate.Precision;
|
||||
});
|
||||
|
||||
FinalRate.BindValueChanged(val =>
|
||||
InitialRate.Value = Math.Min(InitialRate.Value, val.NewValue - InitialRate.Precision));
|
||||
{
|
||||
if (val.NewValue <= InitialRate.Value)
|
||||
InitialRate.Value = val.NewValue - FinalRate.Precision;
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue