mirror of
https://github.com/ppy/osu.git
synced 2025-01-28 08:02:55 +08:00
Reverse conditionals to better define intent in addSourceClockAdjustments
This commit is contained in:
parent
e7ddbc41c8
commit
9735728cf6
@ -216,11 +216,11 @@ namespace osu.Game.Screens.Play
|
|||||||
if (speedAdjustmentsApplied)
|
if (speedAdjustmentsApplied)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (SourceClock is Track track)
|
if (SourceClock is not Track track)
|
||||||
{
|
return;
|
||||||
track.AddAdjustment(AdjustableProperty.Frequency, pauseFreqAdjust);
|
|
||||||
track.AddAdjustment(AdjustableProperty.Tempo, UserPlaybackRate);
|
track.AddAdjustment(AdjustableProperty.Frequency, pauseFreqAdjust);
|
||||||
}
|
track.AddAdjustment(AdjustableProperty.Tempo, UserPlaybackRate);
|
||||||
|
|
||||||
nonGameplayAdjustments.Add(pauseFreqAdjust);
|
nonGameplayAdjustments.Add(pauseFreqAdjust);
|
||||||
nonGameplayAdjustments.Add(UserPlaybackRate);
|
nonGameplayAdjustments.Add(UserPlaybackRate);
|
||||||
@ -233,11 +233,11 @@ namespace osu.Game.Screens.Play
|
|||||||
if (!speedAdjustmentsApplied)
|
if (!speedAdjustmentsApplied)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (SourceClock is Track track)
|
if (SourceClock is not Track track)
|
||||||
{
|
return;
|
||||||
track.RemoveAdjustment(AdjustableProperty.Frequency, pauseFreqAdjust);
|
|
||||||
track.RemoveAdjustment(AdjustableProperty.Tempo, UserPlaybackRate);
|
track.RemoveAdjustment(AdjustableProperty.Frequency, pauseFreqAdjust);
|
||||||
}
|
track.RemoveAdjustment(AdjustableProperty.Tempo, UserPlaybackRate);
|
||||||
|
|
||||||
nonGameplayAdjustments.Remove(pauseFreqAdjust);
|
nonGameplayAdjustments.Remove(pauseFreqAdjust);
|
||||||
nonGameplayAdjustments.Remove(UserPlaybackRate);
|
nonGameplayAdjustments.Remove(UserPlaybackRate);
|
||||||
|
Loading…
Reference in New Issue
Block a user