1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-12 21:02:54 +08:00

Don't directly update HandleUserInput (as it is used by mods)

This commit is contained in:
Dean Herbert 2021-01-30 02:35:11 +09:00
parent 5a306dfc2b
commit d521bfc251

View File

@ -242,10 +242,15 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
{ {
base.Update(); base.Update();
HandleUserInput = Time.Current >= HitObject.StartTime && Time.Current <= HitObject.EndTime;
if (HandleUserInput) if (HandleUserInput)
RotationTracker.Tracking = !Result.HasResult && (OsuActionInputManager?.PressedActions.Any(x => x == OsuAction.LeftButton || x == OsuAction.RightButton) ?? false); {
bool isValidSpinningTime = Time.Current >= HitObject.StartTime && Time.Current <= HitObject.EndTime;
bool correctButtonPressed = (OsuActionInputManager?.PressedActions.Any(x => x == OsuAction.LeftButton || x == OsuAction.RightButton) ?? false);
RotationTracker.Tracking = !Result.HasResult
&& correctButtonPressed
&& isValidSpinningTime;
}
if (spinningSample != null && spinnerFrequencyModulate) if (spinningSample != null && spinnerFrequencyModulate)
spinningSample.Frequency.Value = spinning_sample_modulated_base_frequency + Progress; spinningSample.Frequency.Value = spinning_sample_modulated_base_frequency + Progress;