1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 15:33:05 +08:00

Remove unnecessary (and broken) requiresDebounce check

This commit is contained in:
Dean Herbert 2021-01-08 14:05:34 +09:00
parent 11801d61c1
commit e156bcdcae

View File

@ -47,10 +47,9 @@ namespace osu.Game.Graphics.UserInterface
protected override bool OnHover(HoverEvent e)
{
bool requiresDebounce = HoverDebounceTime <= 0;
bool enoughTimePassedSinceLastPlayback = !lastPlaybackTime.Value.HasValue || Time.Current - lastPlaybackTime.Value >= HoverDebounceTime;
if (!requiresDebounce || enoughTimePassedSinceLastPlayback)
if (enoughTimePassedSinceLastPlayback)
{
sampleHover?.Play();
lastPlaybackTime.Value = Time.Current;